6 ms·
> 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,
by lmm 11y ago
> 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 are suffered in fixing flaws or plugging holes, the more likely it gets that a dependency is fostered upon them. The options you do not explicitly and insistently leave open, tend to close and seal themselves before you know it.
This rings very true. I look at Ceylon and the features I'm most jealous of are things that Scala would and should just do, except for the need to retain compatibility with 10 years of existing applications and libraries, so instead they're enhancement proposals for the version after the version after the next version, and in the meantime we get by with macros that more-or-less cover the most important use cases. And Scala is relatively young as languages go - its warts are nothing to those of, say, C++. Sometimes I wonder if language design can only advance by new languages killing existing languages - past a certain point it seems impossible to change a language in the ways that it needs to be changed to become good.
- akkartik 11y agoI'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/libraries2 http://akkartik.name/post/readable-bad http://akkartik.name/post/readable-bad http://akkartik.name/about http://akkartik.name/about http://akkartik.name/post/mu http://akkartik.name/post/mu
- raiph 11y agoThe formal definition of a version of Perl 6 corresponds to (a frozen version of) the Perl 6 test suite (currently around 120K unit tests). A compiler declares its claimed compliance by reference to these test suites: > perl6 -v This is Rakudo version 2016.01.1 built on MoarVM version 2016.01 implementing Perl 6.c. 6.c labels a frozen version of the Perl 6 test suite and thus a version of the Perl 6 language. All serious users of the language are encouraged to check/improve the language test suite to ensure it covers what they want covered in either an existing version or an upcoming one.
- akavel 11y agoA 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.]
- breuleux 11y agoI think that's a neat idea. I've thought about it, but I've never used Go personally and I wasn't sure just how much it would help. I imagine it works best for languages with good static properties/tools for code analysis.
- lmm 11y agoI think the important cases are the ones that you can't fix by hand - the ones where you're removing a dangerous idiom.
- joliv 11y agoYeah, Python tried this as well with their 2to3 tool (https://docs.python.org/3.5/library/2to3.html https://docs.python.org/3.5/library/2to3.html), but their release bump was a little bigger than the Go prerelease changes (and the users not as flexible) so it wasn't much of a magic bullet.
- kevin_thibedeau 11y agoI find it very useful but it does help to write forward compatible 2.x code and test frequently with 2to3 to catch what it misses.
- stepanhruda 11y agoXcode/llvm has this with fixits.
- 11y ago
- jballanc 11y agoThis is very much what Lua has done. Major version switches not only don't retain backwards compatibility, but have in the past drastically changed the language. With v5.0 they finally seemed to hit on a good combination of features, syntax, and semantics, and the pace of new major releases has slowed noticeably.
- berntb 11y agoIn Perl 5 you can declare the version: use v5.16; Then new features are turned on (and a few things change). This of course implies that a new release have to support all old code, too. Painful to implement, but people expect and do get that 10-15 years old Perl code still work (unless dependent on other languages, of course :-) ).
- candeira 11y agoRich Hickey had about four lispy prototype languages before he set on the design on Clojure, it didn't spawn fully formed from his head. I think that's a sobering thought.
- raiph 11y ago> past a certain point it seems impossible to change a language in the ways that it needs to be changed to become good I think it'll be a few years before Perl 6 matures enough for most folk to see why it matters, but its design incorporates Larry Wall's response to pg's http://www.paulgraham.com/hundred.html http://www.paulgraham.com/hundred.html