POV-Ray : Newsgroups : povray.off-topic : C# 4.0 Default parameters : Re: C# 4.0 Default parameters Server Time
6 Sep 2024 13:19:37 EDT (-0400)
  Re: C# 4.0 Default parameters  
From: Darren New
Date: 4 Feb 2009 19:06:26
Message: <498a2d82$1@news.povray.org>
Orchid XP v8 wrote:
> Darren New wrote:
>> Technically, I would think you could have a curried function in a 
>> language with named parameters pretty easily.
> 
> Yeah, I don't see why not. It's only a shortcut for creating a closure...

I mean, if you have named parameters, it would seem pretty easy to have a 
syntax for currying on any parameter.

>> That's where they're used in C#.
> I didn't think C# had curried functions like my example.

Yeah. Brain-oh. It does have closures, tho. Isn't that a very similar thing?

> Does this transformation happen at compile-time or runtime?

As far as I understand it, the AST is generated at compile time, but you can 
compile it into actual machine code at runtime.

-- 
   Darren New, San Diego CA, USA (PST)
   "Ouch ouch ouch!"
   "What's wrong? Noodles too hot?"
   "No, I have Chopstick Tunnel Syndrome."


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.