[ nice-Feature Requests-994780 ] Exact types in type parameters
"SourceForge.net" <[email protected]> Tue, 22 Feb 2005 09:29:48 -0800
| Newsgroups | gmane.comp.lang.nice.devel |
|---|---|
| Message-ID | <[email protected]> |
Feature Requests item #994780, was opened at 2004-07-20 22:09
Message generated for change (Comment added) made by bonniot
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=362788&aid=994780&group_id=12788
Category: None
Group: None
>Status: Closed
Priority: 5
Submitted By: Bryn Keller (xoltar)
Assigned to: Daniel Bonniot (bonniot)
Summary: Exact types in type parameters
Initial Comment:
It would be nice to have a syntax for type parameters
to indicate that a parameter must be exactly of a given
type. I'll use "#" as the syntax here, since we use "#"
with similar meaning in method implementations.
class Foo<#int T> {
T bar;
}
would be equivalent to:
class Foo<T | T <: int, int <: T> {
T bar;
}
----------------------------------------------------------------------
>Comment By: Daniel Bonniot (bonniot)
Date: 2005-02-22 18:29
Message:
Logged In: YES
user_id=88952
This feature has been implemented (in the form I presented
in the comments) since Nice 0.9.9. Closing.
----------------------------------------------------------------------
Comment By: Daniel Bonniot (bonniot)
Date: 2004-08-12 16:01
Message:
Logged In: YES
user_id=88952
I'm currently working on supporting
class Foo extends Bar<int>
----------------------------------------------------------------------
Comment By: Daniel Bonniot (bonniot)
Date: 2004-07-20 22:45
Message:
Logged In: YES
user_id=88952
(I suppose this is intended when the class extends a
parameterized one, since otherwise the type parameter is not
needed for anything: if T=int, then you can use int instead
of T anywhere inside the declaration)
Why not use rather:
class Foo extends Bar<int>
This looks nicer to me!
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=362788&aid=994780&group_id=12788
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click