Robert Fraser Wrote:
> eris wrote:
> > bearophile Wrote:
> >
> >> eris:
> >>> Is there any way to get around including the exclamation point?<
> >> !(int) tells the template what type is T. Somewhere you have to tell it
> >> what type of items you want to put inside it.
> >> The alternative is l
Robert Fraser Wrote:
>
> > That's a bad, cold, lonely day. :-)
> >
> > bye
>
> And then you come across Lisp, and see a glimmer of hope. An hour after
> that, you decide to hang yourself.
((Why?))
Hello Robert,
eris wrote:
bearophile Wrote:
eris:
Is there any way to get around including the exclamation point?<
!(int) tells the template what type is T. Somewhere you have to tell
it what type of items you want to put inside it.
The alternative is like the old Java, where your colle
eris wrote:
bearophile Wrote:
eris:
Is there any way to get around including the exclamation point?<
!(int) tells the template what type is T. Somewhere you have to tell it what
type of items you want to put inside it.
The alternative is like the old Java, where your collections contain refe
eris:
> Okay. I just assumed that since it was aliased .. and .. I included a type
> that matched the template parameter it should be able to sort that out.
> Re-reading the syntax specs should enlighten me.<
If you want to instantiate a template and you have a value of the actual type,
then
bearophile Wrote:
> eris:
> > Is there any way to get around including the exclamation point?<
>
> !(int) tells the template what type is T. Somewhere you have to tell it what
> type of items you want to put inside it.
> The alternative is like the old Java, where your collections contain
> ref
Daniel Keep Wrote:
>
>
> eris wrote:
> > ...
> >
> > Is there any way to get around including the exclamation point?
> >
> > Thanks,
> >
> > eris
>
> No.
Succint! :-)
> If you want more explanation than that: No, because if you did, the
> parser wouldn't be able to tell when something is
eris:
> Is there any way to get around including the exclamation point?<
!(int) tells the template what type is T. Somewhere you have to tell it what
type of items you want to put inside it.
The alternative is like the old Java, where your collections contain references
to Object, used to store
eris wrote:
> ...
>
> Is there any way to get around including the exclamation point?
>
> Thanks,
>
> eris
No.
If you want more explanation than that: No, because if you did, the
parser wouldn't be able to tell when something is supposed to be a type
and when it's supposed to be an expre
Previously we were having fun with generic programming. When last we tuned in
I had...
An enum:
enum ORDER {DESCENDING, ASCENDING};
An Interface:
public interface Ranker(T) {
bool submit(T value); // submits a value of type T to be included in
top 'n' values, true if added or alrea
10 matches
Mail list logo