14 replies »

  1. The ideal language has tail call optimization? That’s one thing I find I’m missing in a lot of standard languages, but maybe I’m an idealistic functional programmer

    • The language itself should not specify optimizations, that’s the compilers job. However, the language must be optimization aware. The typing an structure must be sufficient such that tail-call optimization can be done. So you are correct in that sense: many languages have certain features and omissions that make some common optimizations impossible.

    • Just because it is guaranteed by the language doesn’t mean it shouldn’t be called an optimization. The point is that the program could actually run without this optimization, therefore it does fall in the optimization realm.

      On the same hand there are many things one does in C++ which if the optimizer wouldn’t eliminate one couldn’t do at all (as the performance would be aweful). Yet these are still called optimizations.

    • I think it’s not an optimization. If you write your program to recurse in tail calls, and you turn off tail call elimination, you’d get a stack overflow in a lot of languages.

    • I still think it is an optmization, as in theory it could run without the elimination. I also mention in another comment that a lot of people depend on C++ optimizations. For example, I make heavy use of templates assuming that even at the lowest optimization levels some optimization is performed. If they compiled strictly according to standard, without shortcuts, the resulting program would be virtually unusable due to aweful performance.

      I’m not 100% adverse to certain optimizations being coded in the language spec however. Perhaps some are special, kind of like copy elision on C++. However, I think such allowances should be made by making the language more open, rather than more heavily specified.

    • Gilad Bracha talked about this a while ago. For Newspeak, they’re intending to support tail call optimisation (and it is an optimisation). However, for debugging purposes it is important to be able to retain the stack frames rather than have them optimised away – otherwise the context in which code is called is lost.

  2. A point that would be interesting to investigate is the code page used by the language. Is it still need to stick to ASCII or should it use unicode character for certain operators?

    • I think the source code should be allowed to use whatever character set you want, specifyable on a per-project basis. The default of UTF-8 makes sense.

      In terms of operators I also belive you should be able to use extended symbols, though perhaps not default. For example, the language would define a ‘contained_in’ function, but your project could map the symbol ∈ to that operator. Given that our computer input (keyboards) is still quite lacking I don’t think one could use those symbols by default yet (too hard to enter).

  3. Using an arrow for assignment eliminates the need for confusion between the assignment ‘=’ and the test for equality ‘==’. On linux it’s automatically
    compose-key, less-than, minus. And one could map a function key.

    The lowly @ sign is hardly ever used. Perhaps allocate it for user-defined operators on their types.

    • I don’t find the ‘=’ and ‘==’ to be confusing, though I do know sometimes the wrong one is used, typically a typo. To prevent this I’m making ‘=’ a statement only operator, not usable in expressions. I will also not allow expression values to be ignored, which captures the case of using ‘==’ instead of ‘=’, since it evaluates to a boolean which at the statement level is not allowed.

  4. I think there’s a wordpress plugin that’ll let you enter a tag into your post that will inline a category listing. And a plugin that lets you put a blurb at the top of a category listing. Plugins are your friend …

    • I belive you require a custom install of WordPress to use plugins though. I’m just using wordpress.com hosting.

    • Ah, indeed you might be out of luck then. I don’t know whether JavaScript of iframe solutions are feasible or worth the trouble, maybe just stick with what you’ve got.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s