7 ms·
> 3. Obscure error messages (macros are to blame here) I feel like this is a bit strongly influenced by the macro experience. Macros are an advanced and powerf
by straight-shoota 4y ago
> 3. Obscure error messages (macros are to blame here)
I feel like this is a bit strongly influenced by the macro experience.
Macros are an advanced and powerful feature and naturally more complex to debug.
In general, Crystal's error messages are often praised for their clarity and helpfulness (especially compared to dynamically typed languages, of course).
> 4. Weak HTTP server implementation -- making things such as a fetching POST params or uploads incredibly frustrating. Once read the request body cannot be read again.
The stdlib implementation of `HTTP::Server` is intentionally very bare-bones (many programming languages don't even have such a practically usable feature in stdlib).
Specialized web server implementations are available as shards (https://shardbox.org/categories/Web_Frameworks https://shardbox.org/categories/Web_Frameworks). They're based on the foundation in stdlib and provide more advanced features.
> 5. Weak/non-existent Windows support
Windows support is pretty stable and almost complete by now.
> 6. No multicore support
Crystal has supported multi-threading as opt-in via the `-Dpreview_mt` flag. It's considered a preview, because it's to be used with care when dealing with data structures that are not thread-safe. But it has proven to work well in production use.
> 8. Nil handling takes a bit getting used to (coming from Ruby)
But once you're used to it, it's sooo much helpful. It just helps to avoid a lot of potential bugs which you would have to take extra care for in Ruby.
- svnpenn 4y ago> Windows support is pretty stable and almost complete by now. This isn't really a genuine statement. Currently Crystal Requires a full installation of Visual Studio on Windows: https://github.com/crystal-lang/crystal/issues/6170 https://github.com/crystal-lang/crystal/issues/6170
- beta-ziliani 4y agoIt just requires the build tools. If you use scoop, that entails to: > run `scoop install vs_2022_cpp_build_tools` (from the "required libraries" link in https://crystal-lang.org/install/on_windows/ https://crystal-lang.org/install/on_windows/)
- svnpenn 4y agoThat just installs Visual Studio: https://github.com/neatorobito/scoop-crystal/blob/main/bucket/vs_2022_cpp_build_tools.json https://github.com/neatorobito/scoop-crystal/blob/main/bucke... no thank you.
- EpicBlackCrayon 4y agoThis specifically installs the Visual C++ Compiler and the Windows headers so that you can get a command prompt with all that in your PATH. It is not a full-fat VS install. The difference is something like 20-30GBs for the full VS install vs 1-2GB for these specific components.
- svnpenn 4y agoMeanwhile, LLVM-MinGW is 108 MB: https://github.com/mstorsjo/llvm-mingw/releases https://github.com/mstorsjo/llvm-mingw/releases
- npn 4y agoYes, for compile crystal program to windows binary, you need to install VS Build Tools. But after the executable binary is compiled then it can run without any dependencies. I think the later is more important for a window program. I gave the exes to my users and none of them had any problem running it. For development currently WSL is still the best way to run crystal in windows.
- svnpenn 4y ago> WSL is still the best way to run crystal in windows. WSL is never the best way to do anything, unless the question is "what is the best way to emulate Linux on Windows?". In all other cases, WSL is literally the worst way to do anything.