For me, it did replace ChatGPT for one reason: The convenience of a lightweight Iris window being just a hotkey away.
339 karma · joined September 8, 2009
Follow me at: https://twitter.com/kssreeram
For me, it did replace ChatGPT for one reason: The convenience of a lightweight Iris window being just a hotkey away.
[1]: https://iris.fun/
Early adopters beware. If the idea doesn't work out for them, they'll pull the product from under you.
Quillpad itself predates Clay and hence doesn't use it.
procedure foo;
[T1,T2]
overload foo(a:T1, b:T2) {
// by default, convert both arguments
// to the type of first argument.
foo(T1(a), T1(b));
}
// the following overload specializes for the case
// when both arguments are of the same type.
[T]
overload foo(a:T, b:T) {
...
implement the logic here
...
} record Point[T] {
x : T;
y : T;
}
updateViaPointer(ptr) {
ptr^.x += 1;
ptr^.y += 2;
}
test() {
var p = Point(10, 20); // type will be inferred as Point[Int]
updateViaPointer(&p);
}That's not true.
Generic Programming is about writing re-usable code that is also very efficient. On the whole, it requires the following:
- Static types
- Overloading
- Type-parametric functions (templates)
- Type specialization.
Not all languages have these features.
Generic programming first took off with C++, when it introduced templates. But a few languages before and after C++ have supported generic programming: Ada, Haskell, D, etc.
edit: formatting.
http://www.reddit.com/r/programming/comments/ctmxx/the_clay_...
"In short, [Backus's lecture] is a progress report on a valid research effort but suffers badly from aggressive overselling of its significance, long before convincing results have been reached. This is the more regrettable as it has been published by way of Turing Award Lecture."
I do hope to revive cspace sometime in 2010.
Opensource projects typically fall in the latter category. The ideal situation is if you manage to establish some sort of connection between your pet project and your source of income.
edit: typos
+1 for that. Sustaining opensource projects is hard. I feel sad when I see that I've not been able to maintain my own opensource project (http://cspace.in) for more than a year.
"Jeff also relayed an interesting philosophy from Mark Zuckerberg: 'Work fast and don’t be afraid to break things.' Overall, the idea to avoid working cautiously the entire year, delivering rock-solid code, but not much of it. A corollary: if you take the entire site down, it’s not the end of your career."
1) Variables being references(pointers) to objects.
2) Function arguments being passed by reference or by value.
In Python, all variables are pointers to heap allocated objects, and these pointers are simply passed by value when calling functions.
In C++, it is much easier to understand this distinction as it provides full control to the programmer on both aspects.