Browse thread
overloading ( was reference initialization )
- Toby Moth
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: | 2000-05-11 (17:51) |
From: | Toby Moth <tmoth@n...> |
Subject: | overloading ( was reference initialization ) |
1. If you are thinking about overloading binary operators, such as +, might it be possible to introduce a unary 'any' operator which gives any old value of the right type ? let init_val = ( any : t ) Ideally, this value should exhibit some form of lazy behaviour, especially when t is a reference type. This might keep someone like Hongwei Xi happier. 2. Also, have there been any thoughts about overloading list pattern-matching syntax, so that we have a functional style for handling general container types ? let ([]) : container->bool = fun c -> ... let (::) : container->(element,container) = fun c -> ( ..., ... ) Obviously, I am not suggesting syntax here, only the kinds of functions that one would need to be able to bind to [] and ::. Toby Moth