Live data from Hacker News

“Screw it, I'll make my own” – The story of a new programming language

breuleux.net

21–30 of 74 posts

Re: “Screw it, I'll make my own” – The story of a new programming language

#21
post #13

Curious. Are there examples of programming languages that allow spaces in identifiers? Obviously, it would need to be designed for that. I'm against the case-sensitive nature of some programming languages, and file systems for that matter. While it makes sense in a computing context (faster), you invent a new mode, just for the computer.. (Fortran was probably case-insensitive because upper-case letters were used fir…

Case-sensitivity makes sense because it enforces uniformity of code. Case insensitivity only matters when you want to write identifiers differently at different locations. The only place where I see this could be useful is when you use a library that uses a different convention.

The IMO better way to solve this is to set a convention for your programming language and enforce it with the compiler (at least with warnings).

Re: “Screw it, I'll make my own” – The story of a new programming language

#23
post #18

> There is a bit of a catch-22 in language design where the more a language is used, the clearer it becomes which parts of it are problematic and should change, but the harder it gets to actually change them. To hone a language you must use it, but applications require that a language's features remain stable, robust, set in stone, and therefore as imperfect as they were at that moment. Furthermore, the more delays a…

I've been trying to break this catch-22 by experimenting with a language/VM/codebase without any backwards-compatibility guarantees. Instead of freezing interfaces for others to use, I'm going to guarantee instead that I'll have tests showing how to use my mechanisms, and you need to have tests for the programs you write using them. I'll try to make breakage happen in obvious rather than subtle ways, but if you don't write tests you'll be in a world of hurt. If you write thorough tests, however, it might be a grand adventure as we hopefully keep the language supple over time. Who's with me?

Probably nobody :) Oh well, I'll be here by myself getting muddy in this foot path next to the highway. But it might be entertaining to read about what I've been up to.

http://akkartik.name/post/libraries2

http://akkartik.name/post/readable-bad

http://akkartik.name/about

http://akkartik.name/post/mu

Re: “Screw it, I'll make my own” – The story of a new programming language

#24
post #18

> There is a bit of a catch-22 in language design where the more a language is used, the clearer it becomes which parts of it are problematic and should change, but the harder it gets to actually change them. To hone a language you must use it, but applications require that a language's features remain stable, robust, set in stone, and therefore as imperfect as they were at that moment. Furthermore, the more delays a…

A nice solution was used during development of the Go language: a tool for code rewriting (it was called "go fix"). It allowed the language authors to quickly and easily transform large swaths of code in the standard library, and also let everybody execute the same transformations in any third-party code. Thus enabling rapid and extremely painless iterations. [I'm consciously simplifying the story a bit to make it shorter and more concise, but I'm not hurting the core message I believe.]

Re: “Screw it, I'll make my own” – The story of a new programming language

#25

In Racket, you can use "-" and "?" in variable names and I love it.

x-y and x - y meaning different things seems like a great source of errors to me

That's not a problem because subtraction in Racket, as in any Lisp-like, looks like this:

    (- x y)

Re: “Screw it, I'll make my own” – The story of a new programming language

#27
> I chose to compile Earl Grey to JavaScript

Some programming languages generate code much deeper down the abstraction stack, e.g. Haskell generating machine code, whereas others generate code to a much shallower depth, e.g. most languages generating JavaScript. A language generating lisp code from some syntax could even be shunting code up the abstraction stack.

How deep does the generated code need to be down the stack for some syntax to earn the name "programming language"?

Re: “Screw it, I'll make my own” – The story of a new programming language

#30
post #13

Curious. Are there examples of programming languages that allow spaces in identifiers? Obviously, it would need to be designed for that. I'm against the case-sensitive nature of some programming languages, and file systems for that matter. While it makes sense in a computing context (faster), you invent a new mode, just for the computer.. (Fortran was probably case-insensitive because upper-case letters were used fir…

Agda allows for "mixfix" function names with spaces. It's very interesting.
Post reply on HN