I'm a native English speaker living in Argentina, and yours is the first English writing I've seen by an Argentine that is enjoyable (I read some of your other posts) and doesn't contain errors, and that includes people who were schooled bilingually.
Is there anything in particular that pushed you over the edge beyond fluent?
Thanks. I've been in the US since the 90s, and by now my writing is about the same in Spanish or English. My early schooling in Buenos Aires was bilingual.
Jorge Luis Borges once said "let others brag about the pages they have written; I'm proud of those I've read." What I believe he meant (and I agree) is that a person's writing is a reflection of what they have read. I've read many more books in English than in any other language (including Spanish).
Thanks for the link. While that looks interesting I was talking about English writing by Argentines, whereas that subreddit is almost entirely in Spanish.
Sorry for the late reply. Yes, it's 80% in Spanish but now and then some foreigner comes asking questions in English and that gives place to lengthy threads in English, mostly written by argentines.
Having typed since I was 5, I think while typing, and going back and forth in code is the same as thinking for me. I'd expect that most of these amazing hackers are from the era where they wouldn't see a keyboard until being 16 or 18.
I'm not a vim/emacs shortcut freak, but I do appreciate environments that don't make me use a mouse.
No, they're duck-typed. Types are attached to values, not variables, and for example trying to eval (+ 1 "hi") will throw a proper type exception.
You usually don't have to declare types but for example in Common Lisp you can optionally declare types for better performance in speed-critical parts of the code.
Procedural does not mean "has a main()". It means that the code within a procedure (or method, or function) is always a sequence of steps, i.e., a procedure. OO is a procedural paradigm. doThis(that) is replaced by that.doThis().
A Prolog program is not specified in terms of a "sequence of steps", for example. Of course, the implementation involves a sequence of operations (because it is typically going to be evaluated on a Von Neumann-style machine), but that has nothing to do with the semantics of the program.
OO does not require that your code be executed any more sequentially than does a functional language.
If by "OO", you mean mainstream OO languages like Smalltalk or Java, then they absolutely do have a more operational definition than a pure functional language does. Objects send messages to other objects; as a result of receiving a message, the internal state of an object changes.
So, you're suggesting that functional programs are somehow totally stateless? Otherwise, I don't really see your point. All useful programs store state somewhere. The fact that OO programs couple state and code doesn't make them procedural. Functional programs just tend to muss over this detail by using closures and anonymous functions (aka "objects") to keep track of state.
An object-oriented program is not required to be expressed in terms of a "sequence of steps" any more than is a functional program. You can instantiate objects that talk to one another, asynchronously or otherwise, to collaboratively do work.
You originally said that the idea that OO languages are imperative is "silly", and that:
Anyone who has worked with a pure OO language knows that there's nothing inherently imperative about the approach.
Can you provide some examples of how you might write "non-imperative" programs in a mainstream object-oriented language?
An object-oriented program is not required to be expressed in terms of a "sequence of steps" any more than is a functional program
A functional program is not a "sequence of steps"; in principle, it is just a mathematical expression that can be evaluated (via some means) to yield a value (think of a SQL query or a Prolog program).
"Can you provide some examples of how you might write "non-imperative" programs in a mainstream object-oriented language?"
Go back and read my post -- I drew a distinction between "mainstream" OO languages, and pure OO languages. If you want to genuinely understand object-oriented programming, don't look at C++ or Java. Look at Smalltalk or Simula.
"A functional program is not a "sequence of steps"; in principle, it is just a mathematical expression that can be evaluated (via some means) to yield a value (think of a SQL query or a Prolog program)."
I know what you're arguing -- the platonic ideal of the functional program is stateless, and methods within that program have no side effects. In reality, all programs store state somewhere, and even "pure" functional languages store state (albeit at a higher level).
What I'm trying to explain is that object-oriented programming doesn't require side effects. Where functional programs use closures and monads to pass state around, you could just as easily use a functor to do the same thing. Thus, you aren't compelled to write object-oriented code in an imperative style. The difference is that OO code tends to be more explicit about the location of state variables, and calls them what they are. Functional programs, in contrast, just tuck the stateful bits into closures, and pretends that they aren't really state.
He never said that. He just said the "Haskell-ish beauty goes out the window," which is arguably true.
In my (limited) experience, Haskell code to do I/O (i.e., Monads) isn't a pretty or elegant as purely functional Haskell code. A lot of Haskell's useful tricks (i.e., its beauty like the ridiculously strong type system or lazy evaluation) don't work on code with side effects.
Is there anything in particular that pushed you over the edge beyond fluent?