6 ms·
I am beginning to think there must be something about Ruby that poisons the mind in this way. There is nothing (major) wrong with Forth, Lisp, or Python syntax
by inimino 10y ago
I am beginning to think there must be something about Ruby that poisons the mind in this way.
There is nothing (major) wrong with Forth, Lisp, or Python syntax, and if you think there is, it's just a prejudice that is slowing you down. Stop being so delicate and get over it.
- vidarh 10y agoNo, I will not "stop being so delicate". I know what I like to work with, and I know what slows me down, and I am in the lucky position of not having to suffer through languages I don't want to work with. (yes, suffer) If you think this has to do with Ruby, you are showing your own prejudice. I first played with Lisp, Scheme and Forth about 35 years ago, and didn't pick up Ruby until about 12 years ago. If anything it was the opposite. I picked up Ruby because it was finally a language that provided similar power to a lot more austere languages packaged in a syntax I can mostly enjoy, and where the syntax mostly fit my way of thinking. Yes, the syntax fits the way I'm thinking - how I write and structure the text of the code affect how I think about things, so I care very deeply about how I lay things out. To me the goal with any code is that it must in the end flow like a story or a poem, or I will be as frustrated as working my way through a badly written novel. To me this is a major difference in how people engage with code. You have the camps that treat code as maths - you see it in extremes in languages like Haskell - and think of it in the abstract, and you have people (like me) who engage with it as exposition. On top of that, as another dimension, you have the issue of to what extent people care about visualisation and aesthetics of the code. To me that is also important. I don't think of code in concepts, I think of it as visual blocks of exposition, carefully laid out to draw attention to specific words or phrases, like a poem, where shape can also matter. Telling me to "get over it" is about as useful as telling me I should just start liking a dish I have already tried and know I hate the taste of. No. I have no reason to suffer for no reason.
- kazinator 10y agoStill, though, you basically back's the article's the point "design syntax last". You like Ruby syntax and it has semantics you like; but the semantics was there first, then Matz came in with the syntax. "Design the syntax last" does not mean that syntax is an unimportant afterthought.
- inimino 10y agoFurthermore, the semantics of Ruby are not unusual at all. Being a scripting language in a class with Python and many others, Ruby basically competes on syntax and libraries/ecosystem. As long as the ecosystem is good enough, it's reasonable to choose Ruby over, say, Python for developing web apps purely because you like the syntax. What I'm getting at is how people will avoid Scheme, Prolog, Haskell, etc. because of "syntax". Which is a loss, and a bit ridiculous as sufficiently different semantics require different, unfamiliar, "scary" syntax. Getting over that is syntax prejudice is just a matter of adjustment.
- vidarh 10y ago> Furthermore, the semantics of Ruby are not unusual at all. Depends on what you consider "unusual". It's not unusual if you're used to Smalltalk, Self or Lisp, with Smalltalk being it's largest semantic influence. Given how niche they are, there are plenty of areas that are "unusual" to a lot of people. > Which is a loss, and a bit ridiculous as sufficiently different semantics require different, unfamiliar, "scary" syntax. Except they usually don't. There are aspects of this with the Lisp family, where homoiconicity is important, that makes different syntax harder, but even there s-expressions was not the originally intended syntax, and "modern" variations show that there is room for other variants even with that property. Heck, my Ruby compiler uses s-expressions as an internal representation (that you can "escape into" from source - it's used to implement low level details). EDIT: You keep falling in two traps: One is to assume that rejecting a language means rejecting the lessons in semantics it brings. Ruby is proof that this is not true - it's a collage of ideas taken from other languages, and predominantly from Smalltalk, another language where syntax is one of the things people balk at. And it contains plenty of lessons from languages that went before - e.g. it has lambdas, it has continuations. It even has call/cc. It's not perfect - that's not the point at all - but it demonstrates that you can "lift" these ideas from other languages and package them in another syntax just fine. The other trap is to assume that because syntax is unimportant to you, it's unimportant to others, and we just can't be bothered. This is like being deaf and jumping to the conclusion that just because you do fine without hearing, everyone else should just ignore the extra signals they get from sound. To me the use of syntax signals intent, and give hints about semantics (when well done) and outline the model of a piece of code. It provides extra information that is lost if the syntax doesn't let me express it. To sacrifice would be like losing my hearing: I'd still be able to function, but why in the world would I willingly give that up? If there was something that offered sufficiently compelling semantics advances, I might. This is one of the reasons I've spent thousands of hours learning additional languages. But here's the thing: Of all the several dozens languages I've spent time on, very few have been all that different when it comes down to it, and especially modern languages are increasingly borrowing most of the important semantic concepts. Most of the semantic concepts that have been "left behind" have been left behind for a reason (consider INTERCAL's wonderful "COME FROM"; an early example of support for aspect-oriented programming) This leaves syntax as a much more important differentiator for most than you might think. You've written off Ruby as "not that unusual" on the basis of syntax, while e.g. not considering that Ruby's main lineage are niche languaes like Smalltalk. That Ruby doesn't seem all that unusual is a testament to syntax. E.g. a concept like being able to execute code in a class definition (not just being able - even "def" is conceptually just syntactic sugar; you can write Ruby code using just the method call define_method instead) is something that seriously messes with peoples mind. That 'require' in most peoples code is not a keyword but a method call that has in most cases been overridden by either rubygems or bundler is something most people aren't even aware of. It's not that these concepts are "unusual" in the sense that they're not there in other well known languages. Ruby certainly isn't another Befunge or False or Aardappel [1]. These concepts certainly are present elsewhere - this is part of Ruby's Smalltalk heritage. But they're not what most developers are used to. Ruby has brought those concepts into the mainstream in a way languages like Smalltalk never managed. That Ruby is not "unusual" is a feature, not a bug. [1] http://strlen.com/aardappel-language http://strlen.com/aardappel-language
- inimino 10y agoIf there is truly no reason, then I wouldn't tell you to get over it. But if there are other languages you'd be learning and using, and the only reason you don't is because of syntax, then you have a reason. To take your example, Haskell can be poetic too, but until you become familiar with the syntax you'll never see it.
- vidarh 10y agoYou keep assuming I'm not familiar with the semantics, and jumping to conclusion about my exposure to these languages without any basis. On the contrary it was through learning them I came to dislike the syntax. I have no doubt you can find Haskell poetic too, but it is not to me.
- mschuetz 10y agoMight as well use Cobol then, if you're that syntax agnostic. I, on the other hand, can't stand the syntax of python or COBOL and it's one of the major reasons I avoid these languages.
- inimino 10y agoIf COBOL was the right tool for the job I wouldn't let the syntax, of all things, stop me. But that is hardly the greatest of COBOL's weaknesses at this point. An odd example. If Python is otherwise a good choice for whatever you're doing and you're avoiding it just because of the syntax, that's an example of what I'm talking about and you should just get over it. It's just a change of perspective.
- abecedarius 10y agoI think you're being kind of mean. I love Forth, Lisp, and Python, and I'd encourage people prejudiced against them to give them more of a chance, but I can also understand how a language can just rub you the wrong way. (Personal example: Go. It has a lot to like pragmatically, but it wants you to code in a particular style. I'd rather code in mine.)
- vidarh 10y agoThe thing is I can see tremendous value in both Forth and Lisp in terms of the semantics, but in some cases we just have to accept that people favour different styles and cross-fertilise the ideas rather than try to make people use the same languages. One of my old pet peeves that I wish I had time to pursue was to experiment with a language that tried to separate presentation from the semantic model - I know there has been other attempts. I wish that got more attention. It's a tremendously hard thing to get right without ending up hampering communication more than you enable it, but the need for high fidelity interchange of programs is one of the biggest barriers to more rapidly iterating on improvements to the presentation of code.
- inimino 10y agoYou can't design a language with Haskell's semantics and Ruby's syntax. So if you want to use Haskell, you just have to get over your dislike of the syntax. It has a beauty of its own, but you'll never see it until you get familiar with it.
- vidarh 10y ago> You can't design a language with Haskell's semantics and Ruby's syntax. Not identical of course, no, but same style would not be a problem. There's nothing in Haskells grammar that can't easily be adapted to a less terse style. It wouldn't solve all issus I have with Haskell by far, but it would go a long way to make me consider it readable. > but you'll never see it until you get familiar with it. I am familiar with it. It is how I came to detest the syntax.
- 10y ago