7 ms·
D 2.093.0
- crazypython 6y agoSee D 2.092.0 for D's preview support for Ownership and Borrowing. https://dlang.org/changelog/2.092.0.html https://dlang.org/changelog/2.092.0.html
- svnpenn 6y ago> With this release it is now possible to install and activate compilers from the Windows command prompt directly. > Assuming an MSYS2 installation is present in C:\msys64, necessary decompression tools can be installed from the Windows command prompt Huh? I would think the whole point of running from command prompt would be that MSYS2 is not needed. And the reality is its probably not. Someone would just need to reimplement the Bash script as a PowerShell script.
- johannes1234321 6y ago> Someone would just need to reimplement the Bash script as a PowerShell script. ... and then maintain it.
- infogulch 6y agoInstalling MSYS2 to run a bash script is like deploying an A-10 Warthog to light the fuse for one of those fountain fireworks.
- yetanta 6y agoThere are much better ways to install things in windows. Such as MSI files if you need to change paths and registry entries. Chocolatey if you want a 'aptget' like usage, there are several of these types. Using bash to install something is unique. I personally am a fan of in place portable install, unzip, run exe, done.
- aldacron 6y agoAnyone who doesn't already have a bash environment installed on Windows isn't the target of install.sh.
- AnIdiotOnTheNet 6y ago> Assuming an MSYS2 installation is present in C:\msys64 Wow, really? Hardcoded paths in 2020?
- dvlat 6y agoI've read it differently, the line below shows an example that begins with 'C:\msys64' prefix. So perhaps this was a way to say that the user doesn't have to install msys to that folder.
- tastyminerals2 6y agoThere are dedicated installers for Windows if that is what you want: https://dlang.org/download.html https://dlang.org/download.html I never used the "install.sh" but just tried and since I have Windows git installed (which comes with MSYS2) it just worked without any issues.
- aldacron 6y agoAny bash environment on Windows will do. install.sh serves a specific use case for those who need it. It installs dmd in the user's home directory along with a script that enables/disables that specific version in the environment, so multiple dmd versions can be installed side-by-side, and the user can switch between versions as needed. It's a convenience script, more than anything else. More suited for people used to developing in Linux who need to work in Windows from time to time (with or without WSL) than regular Windows developers. The latter group will certainly prefer the Windows installer.
- tastyminerals 6y agoNoice! Reading through the release notes leaves a feeling of D being a mature language long enough. If you're looking for magnitutes faster scripting alternative to Python like once me, take a peek!
- throwaway_pdp09 6y agoI'll read through the article but is D really like python in any way? functionals, closures, comprehensions, decorators etc.?
- tastyminerals2 6y agoAnonymous lambdas instead of comprehensions, delegates instead of closures. D does not have decorators in the sense Python does, well function attributes might come close. What I do enjoy in D syntax-wise is UFCS: https://tour.dlang.org/tour/en/gems/uniform-function-call-syntax-ufcs https://tour.dlang.org/tour/en/gems/uniform-function-call-sy... Array slicing, ranges, compile-time execution. Probably the most succinct and easy-to-read syntax out of many compiled languages. It's an investment (as with any other language) but the learning curve is not steep if you get scared away by C++ or Rust for that matter. Julia comes to mind too in terms of syntax but no UFCS and its interoperability with C++/C looks like a lot of work compared to D.
- ttymck 6y agoUFCS is awesome, I had no idea it existed! Implicit classes are my favorite feature of scala[1], I agree .chain syntax is infinitely more readable. [1] https://riptutorial.com/scala/example/7538/implicit-classes https://riptutorial.com/scala/example/7538/implicit-classes
- tastyminerals2 6y agoUnlike in Scala, you can chain your custom methods in D. For example, seqOfChars.map!(a => a.toLower).filterIfNotDigitChar.sort.uniq; is simply not possible in Scala. Here is a great presentation about fp in D: http://beza1e1.tuxen.de/stuff/FunctionalD.pdf http://beza1e1.tuxen.de/stuff/FunctionalD.pdf
- mhd 6y agoI really need to do a basic D -betterC project, just using it as a basic low level language, maybe with a dash of DbC. Probably with embracing some Oberon concepts (static imports, single return etc.)
- crazypython 6y agoYou can use D with GC but manually deallocate memory. This let's one use the GC as a backup.
- WalterBright 6y agoThe D compiler has a switch where you can select the compiler implementation itself to use the GC or manual. This gives options when compiling very large projects (the compiler allows an entire project to be compiled at once, giving the benefits of total program optimization without needing involvement from the linker, this of course uses prodigious amounts of memory).
- qznc 6y agoRecreating Oberon in D sounds like an interesting blog post. Please write about it!
- pjmlp 6y agoOne thing that is needed for the proper experience is dynamic linking and strong type exports from the libraries. Otherwise, as idea for other languages that also want to explore the same OS concepts, make use of IPC like dbus, XPC, COM, with a name server able to translate Module.Command into calls. Then expose this as means to be called on the REPL, via mouse actions, supporting text as parameters, selected text, selected widget or window. Actually from my list above, the IPC tools are already there in modern OSes, but the idea is not properly explored across the whole stack.