4 ms·
I think R is elegant, what's inelegant in it (other than the code lots of non-programmers write with it)?
by bryanrasmussen 4y ago
I think R is elegant, what's inelegant in it (other than the code lots of non-programmers write with it)?
- fny 4y agoIt has 4 ways to do object orientation if IIRC, none of which are compatible.
- bbertelsen 4y agoS3, S4, R6, and reference classes. To be fair they are situational and not one size fits all. The stricter ones are mainly used in biostats where significant metadata makes more sense in OO. S3 is nice and easy, primarily just a list with dispatches. Everything else is less so.
- kgwgk 4y agoDon't forget R7. https://rconsortium.github.io/OOP-WG/ https://rconsortium.github.io/OOP-WG/
- nerdponx 4y agoCore language design? Definitely elegant in my opinion. F-expressions, clever "formula" syntax, everything is an array, great C/C++/Fortran interop. Standard library? Absolute chaos. Some elegant subsets, but mostly a mess that you learn to live with.
- isoprophlex 4y agoThe type system is so abhorrent, it makes me wonder if it's actually proper to call R a real programming language
- kgwgk 4y ago"There are only two kinds of languages: the ones people complain about and the ones nobody uses."
- dunefox 4y agoThis crappy quote is always used to justify bad design.
- isoprophlex 4y agoI'm sorry, did you mean [1] "There are only two kinds of languages: the ones people complain about and the ones nobody uses." :^)
- mike_ivanov 4y agowhat specifically is abhorrent about it?
- isoprophlex 4y agoThe coercion always gets on my nerves, JavaScript gets a bad rep but R is pretty damn warty too; weird ass data types ('ordered factor', anyone) that just seem so very far away from design choices in other languages without being particularly ergonomic or aesthetically appealing
- kyllo 4y agoThe data types make sense to statisticians. Ordered factors are great when you need to fit, say, an ordered logit regression model.
- mike_ivanov 4y agoWhich coercion specifically are you talking about? Could you give an example? Weird data types: R had been designed for and by statisticians with their specific needs in mind, which indeed could look weird to regular people.
- goatlover 4y agoAnd from a different point of view, real programming languages have built-in vectorization and 1-based arrays ;)