Re: If VB.NET had CL macros....



Dimiter "malkia" Stanev wrote:
Today I had to tweak one of our internal tools written in VB.NET, and
wish so much that there be macros... but I knew there ain't.

Here is the problem: on .NET if you want to update a GUI control from
the non-main thread, you have to make a delegate, prepare an invocation,
put the parameters and call it.

If you use F# then you just pass a function to the Invoke method:

form.Invoke(fun () -> ...)

This is also statically type checked, which Lisp macros are not.

Choice of Language Do Matter. I don't care whether it's .NET or any
other runtime, it's about the language. And VB.NET sucks big time!

Of course, but .NET is all about language interoperability, so you should be
able to develop new code in nicer languages like F# with minimal fuss.

--
Dr Jon D Harrop, Flying Frog Consultancy
http://www.ffconsultancy.com/products/?u
.



Relevant Pages

  • Re: The War On HLA
    ... If you're assuming that macros' only purpose is for "in-line" functions, ... languages demonstrate the ability of using macros to extend the language. ... I would ask why you're using Delphi in the first place. ... programming language (i.e., you can assign them to variables, ...
    (alt.lang.asm)
  • Re: macro for shorter array syntax
    ... How is OCaml on adding readmacros, which Lisp can do easily. ... I would not ask that of a parsed language. ... We're confident that using macros is useful to us, ... debate has legitimate points on both sides. ...
    (comp.lang.lisp)
  • Re: LSE64 in standard Forth
    ... The cost of an additional add verses the cost of: ... language and the benefits and pitfalls of that language. ... LSE64 forces a lot more naming of things than Standard Forth, a thing I consider positive, but some in the group have criticized. ... The problem I have with macros is one well known in the C community: while a macro names a concept, it does not automatically provide a clean interface. ...
    (comp.lang.forth)
  • Re: Hey, what is all this off topic posting?
    ... >>> that's all you're using macros for, I can see why you don't much like ASM. ... > PL/I language constructs though. ... >> write the macros using some arcane assembler to do that on a new ...
    (sci.electronics.design)
  • Re: Python syntax in Lisp and Scheme
    ... >>expressive power because you believe it will be misused. ... people programming languages, both on the job and as a University ... that, Macros are just one. ... number of lines of code per year regardless of the language they write ...
    (comp.lang.lisp)