Interestingly removing `fn` was something I've considered more than once, but I had people ask me to keep it. Even though you can get searchability in C by adhering to certain conventions, that's not the same as being able to search ANY code base in a simple manner, which I believe is what people wanted.
I think this is more aimed at people who couldn't quite get their head around C and were happy to have a forced function naming style that made tooling easier.
(note, I am -shit- at C, but genuinely wonder if I could write this without spending 98% of my debugging time tracing segfaults that were down to my own stupidity)
I was confused by this, thought they added `fn` to simplify the parser which to my understanding is why many languages moved away from C style function declarations. I'd rather they move the return type to the end like in Rust and Go for example
Simplifying the parser is cool, but what matters most to me is that I can grep/rg for function definitions. This is really hard in languages that don't have some function keyword.
It simplifies the parser somewhat, but C3 restricts the grammar somewhat from C, so it's possible to unambiguously parse it. However, for people writing tools using `fn` is much easier to parse for. Say you want to write a program that dumps all function names in a file. With `fn` that's a simple regex. Without it you have to do more work.
I still haven't used a IDE that has made my developer experience better than simple text editor and some cli tools. They all seem to fail spectacularly if you have to do something bit more different than they were designed for (usually regarding how the project is built), and often feel very sluggish. Also the project files or build files they generate are usually horrible, and not great for version control.
> I don’t think I’ve ever seen the build and code repo tooling ever work on any professional codebase I’ve worked on, save one.
Yeah I agree though in my experience it is because professional teams are usually infected by at least a few "everyone just uses Vim and a terminal right?" people who then go about turning the build system into some horrible script based system that IDEs can't work with.
Grepping and entire code base just to find where some class is defined is certainly doable (I do it often), but it’s not as nice as just right clicking “Go to definition”. Especially in very large codebase with multiple git submodules.
No one serious would assert that inspecting complex data structure, managing breakpoints, stepping through code, or debugging remotely via text mode gdb like it’s 1986, is as easy or efficient as simply using a GUI in 2022, or even 1992.
My experience is that they always get in way. Either they slow down the whole thing down, or it randomly freezes. Or the code-completion window decides to popup and it again slows things down.
For search, grep or ag will do. As for refactoring, personally I've never had the need for a tooling for that.
>Use whatever headless buildscripts you fancy (make?!) to build your project.
These are just fancy text editors at this point. IDE is like visual studio, or xcode. Sure some of those fancy editors still share the same problems, especially all the java ones (eclipse, android studio, jetbrains ...)
I don't even bother with code-completion. Not having it makes me actually dig the source code of other components, and is usually helpful deciding if I even want to use the said 3rd party component. Programming is more about thinking than looking up fast what functions to call anyhow.
If you wanted code-completion, you'd better use LSP anyways, and you'll get all that fancy compiler diagnostics and whatever in your editor.
I agree. I’m only using “word” completion from open buffers and include lists to save keystrokes. Makes you read, think and choose instead of blindly walking through dots in hope that some combination works. But I also had a good experience with ctags (in 10k+ projects), for quicker navigation.
A good number of those don't have mandated return types, so that keyword is their way of copying c(++)'s look, so its "func main()", like "void main()", instead of just "main()", which to a some people may look strange.
I don't understand why this is relevant. Regardless of the rationale to add it to the language, if syntactically it's `func main()` I can tell it's a function definition because it's always `func`. You can't do that in C++ since it's often some type.
You don't have to do that even in C, you can use this style for function defs
and search or grep for to isolate the definition as opposed to the use.