Re: Is C# any good?
From: Daniel Bonniot (Daniel.Bonniot_at_inria.fr)
Date: 10/16/03
- Next message: jeffc: "Re: Trouble with factory pattern"
- Previous message: Alf P. Steinbach: "Re: Trouble with factory pattern"
- Next in thread: Jacques Garrigue: "Re: Is C# any good?"
- Reply: Jacques Garrigue: "Re: Is C# any good?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 16 Oct 2003 16:54:21 +0200
> What you describe here is still overloading, if not Java
> overloading. It is just handled by the compiler in a different way.
You mean that a single function with optional parameters is a form of
"overloading"?
> OCaml has a similarly feature, and I actually wrote once about the same
> null-based implementation. The main reason (Some 2) and 2 do not share
> the same representation in ocaml is that the GC is too fast for this
> to matter.
My point was more about readability of the source than about efficiency.
It's still an interesting fact that the representation does not matter
much speed-wise.
> You were claiming that an important feature of ?-types is that A is a
> subtype of ?A. Have you got examples where this subtping cannot be
> replaced by the above kind of overloading?
Sorry, but I am getting confused about what "above" precisely refers
too, as we are speaking about several solutions. Could you clarify this?
However, I can see a way top use overloading to make function call as
convenient as if there was the subtyping. But that involves quite a lot
of tedious work furing function definition.
> Saying that ?-types are actually no more than cleverly implemented
> option types is not a criticism. I think the distinction between A and
> ?A is useful (even in a Java-like language), and that the tight
> integration of ?-types in the compiler considerably improves their
> comfort of use. This is what matters. And comfort is not a hack.
I completely agree with this. I just felt I would stress this comfort
advantage because I did not see it acknowledged in the initial post.
Daniel
- Next message: jeffc: "Re: Trouble with factory pattern"
- Previous message: Alf P. Steinbach: "Re: Trouble with factory pattern"
- Next in thread: Jacques Garrigue: "Re: Is C# any good?"
- Reply: Jacques Garrigue: "Re: Is C# any good?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|