(I am a UK citizen).
(I am a UK citizen).
Structure recognition should be pushed as far down in the subconscious as possible. Rainbow parens help, but it’s not nearly enough to stop other expression fragments from jumping into attention. Likewise clojure’s different bracket types for data structures, likewise the editor highlighting the paren matching the one at the cursor. Better than nothing, but incomparably worse than just having visually distinct syntax in the first place.
C-style is fine. Python-style, ML-style, SQL-style, BASIC, shell: all fine for structure recognition. But lisp is just a soup. Or a fog.
Same problem with elasticsearch queries, too.
This is how C++ is designed. Unfortunately, it precludes types from taking dependencies on their own address, which is critical for e.g. atomics. As far as I know, there is no way to actually force a C++ class to be heap allocated. I’ve tried.
Newer languages like Swift give the type designer the ability to say “the address of this object in memory is important and must remain stable for the lifetime of this object.” This decays to heap allocation.
If anything, I’ve found it’s more useful when I want to bypass such wrapping to force a class to use some particular memory (like from a bulk allocation). The STL is pretty good, but there are warts that which still force the default heap allocator like std::function.
1. underscores in literals:
int a = 1_234_567;
2. case ranges: case 5 .. case 6:
3. named arguments: void test(int a, int b);
void foo() { test(b:3, a:4); }
4. nested functions: int foo(int i) {
int plus(int a) { return a + i; }
return plus(3);
}
5. static nested functions: int foo(int i) {
static int plus(int a) { return a + i; }
return plus(3);
}
Error: `static` function `test.foo.plus` cannot access variable `i` in frame of function `test.foo`
6. a feature similar to generators https://dlang.org/spec/statement.html#foreach_over_struct_an...One of the original author of Ribbit here, glad to see it is still getting attention. Léonard and Marc took the project much further than I imagined.
As a fun fact, the project started as a riff of Justine Tunney's famous https://justine.lol/sectorlisp/.
For the interested, my new favorite project from Marc's team is https://github.com/udem-dlteam/pnut
The real trick is to fix your mouth leak. Getting on the right pressure helps with that. Fixing your sleeping position can help. Mouth tape can help. A cervical collar can help. Anything that will help you keep your mouth shut at night.
You know what really makes Emacs different than other editors and IDEs? Consider many ways one can transform selected text in VSCode. Let's say there are maybe 3-4 ways, with some extensions it can get to, I dunno a dozen?
Now consider that Emacs allows you virtually unlimited ways of doing the same thing. Because there are virtually unlimited ways to program that behavior.
In VSCode, you'd be clicking buttons and using shortcuts. Imagine if you had virtually unlimited number of buttons there? For different ways of running a command. That would be insane, right?
Well, here comes the argument if VSCode's (default) way maybe actually better? Some may argue about cognitive overhead - flexibility isn't free after all. Some programmers prefer tools to be tools rather than clay, yeah?
That's totally okay, I'm fine with all that. I'm just seriously baffled as to why Emacs is such an underrated and misunderstood tool. Why don't more programmers even attempt to try it? If you are a programmer, for sure, you should be, at least to a certain degree, curious about the ultimate programmable environment, no?
And don't bring the argument that non-emacs things are also "extendable". In virtually none of them can I open a buffer and add yet another way to transform selected text. Right there, without even saving that code in a file.
For an example of a system that I think is probably just as extensible as emacs, look at TiddlyWiki. If you really want to, you can add in arbitrary JS and even the main tiddler edit form is itself a tiddler that can be customized as much as you want.