so, how does that work?

do something something if something ?

what about else clauses?

at least condition?true:false is sorta reasonable (C and javascript have this type of syntactic sugar).

Reply to this note

Please Login to reply.

Discussion

Yeah it only works for one-liners with no else clauses. Sure it can be "nice" but in my distant (15 years ago) experience Ruby gets so loaded up with sugar you can't figure out what the computer is even doing anymore.

I think half the reason that Ruby is dog slow is because the developers purposely write their code to hide implementation details to keep the interface "nice". Everyone ends up calling code with unknown costs that is doing a bunch of unnecessary magic.

Rails philosophy of "convention over configuration" is an example. If you do things in the conventional way it all just magically works. But to a developer unfamiliar with those conventions it is a black magic mystery why it works at all.

Also "everything is an object" is nuts. Sometimes a number it just a number, a struct is just a struct, a function is just a function. Any language that does the "everything is a ..." dance is nuts.

except when they say a function is a variable. that's a powerful distinction. for which reason basically all languages support closures now.

also i think you can boil things down to constant, variable, type, function/method (the receiver is just a convenience) and pointer/reference. to make things easy for humans, you can then attach a symbol to these, which gives you debugging.

objects are shit because they are usually 3+ levels of indirection which opens up space for misinterpretation, long compilation times, and pernicious, hidden errors.

yes, symbols allow debugging and reflection, which allows you to write code that writes code. this is how some interpreters implement execution of interpreted code, by assembling trees of closures and then loading their stacks

Objects are fine, but nesting them or endless inheritance is complete garbage. I shouldn't have to dig through 10 levels of inheritance trying to figure out which overload of a method is actually being called. Zend and by extension Magento are terrible at this. The later tried to make the core functionality extensible by non-programmers via an awful XML plugin language. By the time that was done being applied a view model could be any of about 20 similarly (or even identically) named things.

yeah, javascript has a lot of that, all OOP languages have a lot of that (which includes JS). the worst you have to deal with in Go is interfaces, but a good IDE symbol database makes that easy. Go is a bit harder to see it because of implicit satisfaction of interfaces, where java has explicit declaration of interfaces.