Lurker News

Comments (191) 32 threads

Earlier comments
thelazydogsback2 replies#
I love Typescript -- I just wish there were an alternate runtime (.Net core CLR/DLR or other) that offered shared-memory green and/or native threading for true support for embarrassingly parallel but not vectorized workloads. FWICT, I don't think Deno changes things here much. Typescript on the BEAM would be interesting to me as well.
eyelidlessness#
I would absolutely love to work with the TypeScript type system on BEAM, if it didn't leak as much of Erlang particulars as other BEAM languages like Elixir do.
g5becks#
I think I’d prefer compilation to Go.
crazypython#
DLang can sort an array at compile-time using a normal function: (CTFE)

  void main()
  {
      import std.algorithm, std.conv, std.stdio;

      "Starting program".writeln;

      // Sort a constant declaration at Compile-Time
      enum a = [ 3, 1, 2, 4, 0 ];
      static immutable b = sort(a);

      // Print the result _during_ compilation
      pragma(msg, text("Finished compilation: ", b));
  }
It can also reflect at compile time on user-defined annotations, which can store arbitrary metadata on any symbol, to generate arbitrary code at compile time. They serve a similar role to procedural macros from Rust, but they're easier to use than the earlier. Thanks to mixin templates, you can inject arbitrary symbols, making D's UDAs just as flexible as Python's decorators.
blitz_skull#
Genuinely curious: is this actually useful or just a cool thing that is useful simply for the fact that it can be done?
z3t4#
Personally I find RegExp more readable: SELECT(.)FROM(.)WHERE?(.)ORDER BY?(.)LIMIT?(.*)

Load more comments