5 ms·
One thing I'm missing in all these languages is 100% auto-completion like the one you have in Java or C#. I have yet to experience a single instance of Intellij
by przmk 6y ago
One thing I'm missing in all these languages is 100% auto-completion like the one you have in Java or C#. I have yet to experience a single instance of Intellij not being able to auto-complete something or not do it completely.
I know Nim and Rust have good VS Code plugins that do that to some extent but it is not something I can rely upon.
Maybe I'm just spoiled.
- ddoeth 6y agoKite is doind pretty well for me in Python. In my experience a lot of stuff that is auto-completed in java is boilerplate, stuff that I don't really need in python.
- twic 6y agoThe names of methods and parameters are boilerplate? I'd be interested to hear how you avoid the need for those in Python.
- skocznymroczny 6y agoMany of these languages rely on code generation, whether it's templates, macros, preprocessor. Since a lot of the code doesn't exist until compile time, it's hard to have the same level of autocomplete as in Java/C#, where everything is basically known from the start.
- gameswithgo 6y agoThat can be a minor complication compared to just, writing a good autocomplete system at all. Microsoft went to a lot of effort, they have some good video talks about it out there. But being able to give compiler feedback in realtime requires thinking about the compiler with that in mind from the start, other wise it is too slow and resource consuming.
- 0-_-0 6y agoThis issue is taken seriously and there are plans for improving developer tooling: https://github.com/nim-lang/RFCs/issues/300 https://github.com/nim-lang/RFCs/issues/300
- otabdeveloper4 6y agoMost languages (that aren't Java) don't really need autocomplete.
- cb321 6y agoNim, in particular, has rather terse but elegant ways to package abstractions so that use is "obviously" locally scoped. Just as one example (more fully elaborated here [1]), there is no pointer arithmetic by default, but one can write a tiny little template to add those operators and then invoke it in a local scope like: ...surrounding code... ptrMath: let address = base + offset ...surrounding code... In this way many different & arbitrary "generally unsafe but also sometimes very convenient" constructs can still be used at an author's discretion, but be used in a way to make a reader (perhaps) pay better attention in a way that is more specific than some "generically 'unsafe'" block. This is, of course, just the tip of a meta-programming iceberg. [1] https://forum.nim-lang.org/t/1188#7366 https://forum.nim-lang.org/t/1188#7366
- rob74 6y agoIf you mean that autocomplete saves you less typing in other languages, I agree, but as long as it's a language with methods (where you're not always sure how the method you want to use is called) and parameters (where you're not always sure about the order), autocomplete is helpful. Of course, if you're a rockstar ninja genius who has every single method of every single class memorized, you're not gonna need it, but us mere mortals appreciate it...
- cb321 6y agoNim (like Python) has keyword argument calling that softens the need to remember the out-of-n! order of parameters (by either author|reader). I.e. you can say at the call site `myAPIcall(foo=1, bar="hi")` even if the definition is `proc myAPIcall(bar: string, foo: int)`. Arguably, this puts more pressure on code completion systems figuring out parameter names. So, I am not really disagreeing with @rob74 -- just adding some color related to this specific programming language. I've always been a bit mystified that named parameter calling was not far more popular. Its use in programming languages seems quantitatively rare, but the upsides seem far more valuable than any downsides. Its use for either short or long options when calling commands has been a very strong de facto standard since, well, the dawn of commands (there are always exceptions, of course).
- kungito 6y agoI'm very spoiled from C# and Visual Studio 2019. I have recently started working professionally in Rust and while I do feel the drop in ergonomics, half of the problem is from downgrading from full IDE like Visual Studio to Visual Studio Code. I'd say what I currently miss the most in Rust+VSCode is better debugging experience. I used to mostly develop features and fix bugs via interactively using the debugger and immediate window in C# while here it's not possible
- swiley 6y agoI'm normally pretty anti IDE but one thing visual studio got really really right was the debugger UI. GDB isn't too bad but it's no visual studio.
- jrimbault 6y agoFYI last week on my windows box : I miss clicked and launched a rust test in debug mode which launched the integrated debugger view in vscode but of course the test ran to completion without stopping since I didn't set a breakpoint, that triggered curiosity in human me, so I set a breakpoint in vscode, clicked "debug" and voilà, it actually worked and I didn't feel like I had to setup anything in particular. (I have VS2019 installed, and use the rust-analyzer vscode plugin)
- scns 6y agoCLion offers a debugger for Rust.
- mcintyre1994 6y agoThis is the biggest downside I've found with Elixir as well, it's just not as easy/enjoyable to write code without really good autocomplete.
- PixyMisa 6y agoThere is an official Nim plugin from JetBrains now. It won't be as polished as Java support for obvious reasons, but at least you can stick with your preferred environment.
- guggle 6y agoExcellent news, thank you !
- MrMan 6y agoIn which editor? This would really help me. IdE support and no pandas/numpy are the main things holding me back from full nim adoption
- cb321 6y agoThere is NimData [1] and ggplotnim [2] and Arraymancer [3]. Also, neovim works well with the alaviss plugin [4], though it's not quite a full IDE. Most Nim coders use VS. [1] https://github.com/bluenote10/NimData https://github.com/bluenote10/NimData [2] https://github.com/Vindaar/ggplotnim https://github.com/Vindaar/ggplotnim [3] https://github.com/mratsim/Arraymancer https://github.com/mratsim/Arraymancer [4] https://github.com/alaviss/nim.nvim https://github.com/alaviss/nim.nvim
- gameswithgo 6y agoI know your pain. Have you used Rust lately with the Rust-Analyzer plugin? Don't use the old "rls" one. You might be pretty happy with it these days.
- przmk 6y agoIt's great indeed and it's advancing quickly. I hope it'll reach 100% coverage at some point but I don't know whether that's achievable.
- Sheepsteak 6y agoOh right, I was using "rls" as part of the MS VSCode plugin and gave up using Rust in the end as it was so bad to me. I might check this one out.
- melling 6y ago25 years ago I would have said people were just being lazy for expecting autocompletion. Now I think we should demand autocompletion, and much more. We should want both our languages to be smarter (type inference) so we can type less, and our tools are should know what we want to type. https://www.tabnine.com/ https://www.tabnine.com/
- rq1 6y agoType strong to type less. :)
- nimmer 6y agoIf I don't remember how to use some function it's a sign that I have to read the documentation. The documentation can have important tips around performance, security & recommended usage patterns that I need to know. And if you don't remember a lot of methods it means you might be out of your league and need to read the documentation and go through a tutorial to understand what you are doing. Keyword, method and variable completion is ok, but overzealous completion encourage churning out code on "autopilot". If you are not Torvalds it's better to write code good slowly than the opposite.
- ketzu 6y agoUnfortunately, there are functions where I know how to use them, and still can't reliably spell them correctly. Also it helps preventing confusion between languages. Is it length or size? Are the math operations qualified with type information or overloaded (e.g., labs/abs/fabs in cmath)? Lastly, at least the auto completion I used in intellij and visual studio is a peak into the documentation, it lists the full method signature, including all other methods, and opens the documentation on click.
- nly 6y agoMy feeling is we (developers) should be able to figure out how to use a function reliably and safely from just the signature for 95% of functions...if you can't then the API is badly written.
- abhijat 6y agoThe rust plugin for intellij is pretty good and keeps getting better, both in terms of intellisense and refactoring.
- klibertp 6y agonimsuggest and nim-mode work quite well in Emacs with auto-complete, go to definition, and find references. There's also an LSP server in the works IIRC. If you want good auto-complete for less popular languages, you need to use an editor which is both popular enough and makes writing completers easy enough. From my experience, Emacs with company or auto-complete packages is just like that, and I have auto-completion set up for 10+ languages, but I'm sure there are other editors out there you could use.