It’s possible that you are much better at automatically memorizing words than I am.
Or simply annoyed by different things.
Are you saying that, when I have some practical task to finish, the best solution is to pick the most elegant language, disregarding all other options—and that not doing so makes me arrogant?
Sorry for unclear phrase. I mean that language’s lack of tools is language’s arrogance.
rules that let you say “if(a=b)” also let you say “a=b=c”
“a=b=c;” vs “a=c; b=c;” is not much; the former syntax simplifies injection of vulnerabilities (intentionally or incidentally).
Instead, they stem from the fact that, ultimately, your computer is an electron-pushing device which is operating under real-world constraints
You are right about x86 assembly, though, which is why I mentioned “a small microcontroller” in my original post. Their assemblies tend to make more sense
I have written in C for these microcontrollers—physical constraints visibly leak into the language, so if you are learning C anyway, you could delay learning assembly.
why all these language features were created in the first place, and which problems they are designed to solve. But if you never intend to write practical programs that perform applied tasks, maybe that’s ok.
If you learn just Scheme and OCaml you still can understand what type system and type inference gives you.
You can appreciate steam engine without knowing nuclear physics, after all.
I mean that language’s lack of tools is language’s arrogance.
I’m still not sure what you mean by that. Are you suggesting that all languages should make all possible tools available ? For example, should every language, including C, Javascript, Java, C#, Ruby, Python, Dart, etc., provide a full suite of Bluetooth communication libraries ? I agree that it would be really neat if this were the case, but IMO it’s highly impractical. Languages are (so far) written by humans, and humans have a limited amount of time to spend on them.
“a=b=c;” vs “a=c; b=c;” is not much; the former syntax simplifies injection of vulnerabilities (intentionally or incidentally).
What do you mean by “injection of vulnerabilities” ? Also, “a=b=c;” should be more correctly rendered as “b=c; a = b;”. This makes it possible to use shorthand such as “if ( (answer = confirmRequest()) == CANCEL) … ”.
so if you are learning C anyway, you could delay learning assembly.
Sure, you could delay it, but it’s best to learn it properly the first time. There are certain essential things that are easy to do with assembly that are harder to do with C: for example, balancing your branches so that every iteration of the main loop takes the same number of cycles.
If you learn just Scheme and OCaml you still can understand what type system and type inference gives you.
If you were a person who only knew Scheme, how would you explain “what type inference gives you”, and why it’s useful ?
I mean that language’s lack of tools is language’s arrogance.
I’m still not sure what you mean by that. Are you suggesting that all languages should make all possible tools available ?
It was a clarification to some specific phrase in my previous comment. The original phrase answers both your questions. I specifically said that it can be lack of resources or competence, not only arrogance. And this is specifically about tools that allow you to tailor the language to your specific task, so that there are no problems with language that you are prohibited from solving. Somebody can always write a bluetooth library.
certain essential things that are easy to do with assembly that are harder to do with C: for example, balancing your branches so that every iteration of the main loop takes the same number of cycles
This is not essential for many applications, even with what is now called microcontrollers. Learning optimization on that level is something you can do while having a good grasp of other concepts already.
If you were a person who only knew Scheme, how would you explain “what type inference gives you”, and why it’s useful ?
Type inference allows you to write with strict typechecks and catch some kinds of errors without cluttering the code with type specifications for every variable.
And this is specifically about tools that allow you to tailor the language to your specific task, so that there are no problems with language that you are prohibited from solving. Somebody can always write a bluetooth library.
That makes sense, and I do wish that more languages supported more capabilities, but I think it’s unrealistic to expect all languages to support all, or even most, or even some large fraction of real-world tasks that are out there. There are vastly more tasks than there are languages: graphics (raster, vector, and 3d, on various systems), sound, desktop user interfaces, bluetooth, TCP/IP networking, bio-sequence alignment, finance, distributed computation, HTML parsing and rendering, SQL access… and that’s just the stuff I’d had to handle this month !
Learning optimization on that level is something you can do while having a good grasp of other concepts already.
I think the opposite is true: performing this kind of optimization (even on a “toy” program) is exactly the kind of task that can help you internalize those concepts.
Type inference allows you to write with strict typechecks and catch some kinds of errors without cluttering the code with type specifications for every variable.
I agree with you there, but I’ll play Devil’s Advocate, in my attempt to adopt the perspective of someone who only knows Scheme. So, can you give me an example of some Scheme code where the strict typechecks you mentioned are truly helpful ? To me (or, rather, my Schemer’s Advocate persona) this sounds inelegant. In Scheme, most entities are pairs, or data structures built of pairs, anyway. Sure, there are a few primitives, but why should I worry about 5 being different from 5.0 or “5” ? That sounds like a job for the interpreter.
That makes sense, and I do wish that more languages supported more capabilities, but I think it’s unrealistic to expect all languages to support all, or even most, or even some large fraction of real-world tasks that are out there
You didn’t understand my point correctly. Language per se should not support directly, say, bluetooth—because bluetooth will change in an incompatible way. Language could live without a bluetooth library—why not, there is always FFI for dire cases. But the question is about allowing to define a nice API if a need arises. More or less any metaprogramming tool that is not constrained in what it can create would do—those who want to use it, will wrap it in a layer that is nice to use, you can then just incorporate their work.
Common Lisp didn’t have any object system in the first edition of the standard; CLOS was prototyped using macros, documented, and then this documentation was basically included in standard. Of couse, macro use could be somewhat more clumsy or more explicit for any reason (make it easier to control overuse, for example) - this is not a problem. The problem is there when you have zero ways to do something—for example, to define a non-trivial iteration pattern.
So, can you give me an example of some Scheme code where the strict typechecks you mentioned are truly helpful ? To me (or, rather, my Schemer’s Advocate persona) this sounds inelegant. In Scheme, most entities are pairs, or data structures built of pairs, anyway. Sure, there are a few primitives, but why should I worry about 5 being different from 5.0 or “5” ? That sounds like a job for the interpreter.
Sorry? I was talking about things that help to catch errors. In any small snippet the errors are simple enough to find for this to be unillustrative. It only helps you when you have some kind of wrong assignment in 1K+LOC.
Or simply annoyed by different things.
Sorry for unclear phrase. I mean that language’s lack of tools is language’s arrogance.
“a=b=c;” vs “a=c; b=c;” is not much; the former syntax simplifies injection of vulnerabilities (intentionally or incidentally).
I have written in C for these microcontrollers—physical constraints visibly leak into the language, so if you are learning C anyway, you could delay learning assembly.
If you learn just Scheme and OCaml you still can understand what type system and type inference gives you.
You can appreciate steam engine without knowing nuclear physics, after all.
I’m still not sure what you mean by that. Are you suggesting that all languages should make all possible tools available ? For example, should every language, including C, Javascript, Java, C#, Ruby, Python, Dart, etc., provide a full suite of Bluetooth communication libraries ? I agree that it would be really neat if this were the case, but IMO it’s highly impractical. Languages are (so far) written by humans, and humans have a limited amount of time to spend on them.
What do you mean by “injection of vulnerabilities” ? Also, “a=b=c;” should be more correctly rendered as “b=c; a = b;”. This makes it possible to use shorthand such as “if ( (answer = confirmRequest()) == CANCEL) … ”.
Sure, you could delay it, but it’s best to learn it properly the first time. There are certain essential things that are easy to do with assembly that are harder to do with C: for example, balancing your branches so that every iteration of the main loop takes the same number of cycles.
If you were a person who only knew Scheme, how would you explain “what type inference gives you”, and why it’s useful ?
It was a clarification to some specific phrase in my previous comment. The original phrase answers both your questions. I specifically said that it can be lack of resources or competence, not only arrogance. And this is specifically about tools that allow you to tailor the language to your specific task, so that there are no problems with language that you are prohibited from solving. Somebody can always write a bluetooth library.
This is not essential for many applications, even with what is now called microcontrollers. Learning optimization on that level is something you can do while having a good grasp of other concepts already.
Type inference allows you to write with strict typechecks and catch some kinds of errors without cluttering the code with type specifications for every variable.
That makes sense, and I do wish that more languages supported more capabilities, but I think it’s unrealistic to expect all languages to support all, or even most, or even some large fraction of real-world tasks that are out there. There are vastly more tasks than there are languages: graphics (raster, vector, and 3d, on various systems), sound, desktop user interfaces, bluetooth, TCP/IP networking, bio-sequence alignment, finance, distributed computation, HTML parsing and rendering, SQL access… and that’s just the stuff I’d had to handle this month !
I think the opposite is true: performing this kind of optimization (even on a “toy” program) is exactly the kind of task that can help you internalize those concepts.
I agree with you there, but I’ll play Devil’s Advocate, in my attempt to adopt the perspective of someone who only knows Scheme. So, can you give me an example of some Scheme code where the strict typechecks you mentioned are truly helpful ? To me (or, rather, my Schemer’s Advocate persona) this sounds inelegant. In Scheme, most entities are pairs, or data structures built of pairs, anyway. Sure, there are a few primitives, but why should I worry about 5 being different from 5.0 or “5” ? That sounds like a job for the interpreter.
You didn’t understand my point correctly. Language per se should not support directly, say, bluetooth—because bluetooth will change in an incompatible way. Language could live without a bluetooth library—why not, there is always FFI for dire cases. But the question is about allowing to define a nice API if a need arises. More or less any metaprogramming tool that is not constrained in what it can create would do—those who want to use it, will wrap it in a layer that is nice to use, you can then just incorporate their work.
Common Lisp didn’t have any object system in the first edition of the standard; CLOS was prototyped using macros, documented, and then this documentation was basically included in standard. Of couse, macro use could be somewhat more clumsy or more explicit for any reason (make it easier to control overuse, for example) - this is not a problem. The problem is there when you have zero ways to do something—for example, to define a non-trivial iteration pattern.
Sorry? I was talking about things that help to catch errors. In any small snippet the errors are simple enough to find for this to be unillustrative. It only helps you when you have some kind of wrong assignment in 1K+LOC.