POV-Ray : Newsgroups : povray.off-topic : Lots of statistics : Re: C# Server Time
29 Jul 2024 14:26:00 EDT (-0400)
  Re: C#  
From: Orchid Win7 v1
Date: 19 Aug 2012 06:26:15
Message: <5030bf47$1@news.povray.org>
On 18/08/2012 06:43 PM, Darren New wrote:
> On 8/18/2012 3:14, Orchid Win7 v1 wrote:
>> I very much doubt that C# lets you trivially call arbitrary machine code.
>
> You would be mistaken. It's no harder in C# to call COM or C code than
> it is to do so from C++. Machine code? Well, you have to know the
> calling convention, but sure, you can do that.

It's no harder to call C than to call Haskell, once you define where the 
hell the function is and what arguments it's expecting. Your point?

>> In that case, yeah, it ought to be possible to build something that does
>> this. Nobody has, but somebody could.
>
> OK, so Haskell supports dynamic loading of code including declaring new
> types? Funky.

It's commonplace to write Haskell code which doesn't know exactly what 
data types it's dealing with. Dynamically loading new types that didn't 
exist at compile-time isn't really a problem, in principle. The only 
real problem is that the current language implementation doesn't support 
this well.

>> There's nothing about the /language design/ that makes this impossible.
>
> Sure. But some systems are designed to make this easy, and some aren't.

Fair enough.

> Of course any language can manage pretty much any function with enough
> effort. Even BASIC can have good object-code compatibility if you work
> hard enough at it. (I think they call it VB.NET, ;-)

VB isn't BASIC. VB is a language with a very slight resemblance to 
BASIC, which has "basic" in its name. Really, it's an utterly separate 
language.

And that's the point - any language can be made to support anything if 
you TOTALLY CHANGE THE LANGUAGE. The question is whether you can do X, Y 
or Z /without/ drastically changing the language.

> The question is how
> much effort does it take, and how much does it look like part of the
> language when you're done.

OK.

>> Don't you need a web browser to run JavaScript code?
>
> Why would you need a web browser?

JavaScript is a language invented for controlling web browsers. I don't 
know of anything else that runs it.

> Except that JS is dynamically-typed.

And Haskell can't manage dynamically-typed code.

Oh, wait. Yes it can.

> The point is whether it's easy to take a
> lazy functional declarative language and conveniently invoke a stateful
> dynamically-typed collection of functions and objects. I can't even
> imagine how you'd write a wrapper for something like that, in terms of
> declaring it and invoking it.

"I can't imagine how this would be possible" isn't the same as "this is 
not possible", as everyone is so fond of reminding me.

>> From what I can see, C# is superior at migrating C++ code and letting it
>> integrate with old VB code...
>
> You barely even know how it works, and you've not written any
> significant programs in it, so you're judging from a position of
> ignorance. :-)

I said that the design is overly complicated and cluttered. That it 
lacked simplicity and elegance. Why would I need an encyclopaedic 
knowledge of the language to say that?


Post a reply to this message

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