2 ms·
I agree with the Java part, what I mean is that expressiveness should be readable So think more Python and less C, things like: while (*a++) Are expressi
by raverbashing 6y ago
I agree with the Java part, what I mean is that expressiveness should be readable
So think more Python and less C, things like:
while (*a++)
Are expressive but they're unsafe and actually doing things the language should have built-in (in a safe way)
- woofie11 6y agoI think we're in agreement. I do a lot of my work in Python these days. One of the really nice things Python did is take the major design patterns in Lisp/Scheme, which were super-powerful but quite unreadable, and gave visually-distinct ways of expressing those. For example, major design patterns like maps and filters are done as list comprehensions, which are nice. Ditto for decorators. The key thing is that I still have general-purpose functional programming (except for tail recursion, which I dearly miss), but I use constructs which don't have explicit Python semantic quite rarely. Still, there are times when I can do something which will e.g. cut architectural complexity in half, and that's well worth a little bit of magic code. I'll usually try to do that in an isolated, well-documented file which has the magic. That's enabled by having a language which relies on programmers having discipline rather than handcuffs. It's a lot cleaner than the architectural contortions I see for any use of Java beyond its target (Java has a nearly ideal set of expressiveness for making an inventory management system, CRM, store web site, or similar types of database-backed applications). As a footnote, the place for the type of C code you gave is low-level programming. That's a disappearing market, as even microwaves can now afford RISC chips in the tens of megahertz with modern memory managements, but for hardware, you really care not just what happens, but how it happens. I know what machine code while(*a++) will translate to, and for those sorts of systems, that's nice.