![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#11 | |
|
Programming Guru
![]() Join Date: Aug 2005
Location: England
Posts: 1,499
Rep Power: 5
![]() |
Quote:
|
|
|
|
|
|
|
#12 |
|
Hobbyist Programmer
Join Date: Apr 2006
Posts: 155
Rep Power: 3
![]() |
Oh, I thought that, thanks.
I'm not that familiar with C++ yet. :o
__________________
-- v0id
|
|
|
|
|
|
#13 | |
|
Hobbyist Programmer
Join Date: May 2006
Location: West Jordan, Utah, United States
Posts: 176
Rep Power: 3
![]() |
Quote:
As for your last comment, I never really thought about that! But choosing C# as a language would not be as wise as choosing .NET as a platform. |
|
|
|
|
|
|
#14 | |
|
Programming Guru
![]() Join Date: Aug 2005
Location: England
Posts: 1,499
Rep Power: 5
![]() |
Quote:
Eiffel allows developers to define preconditions and postconditions for functions, and class invariants for classes. A precondition validates function input, a postcondition output. A class invariant is a statement that is always true about a class. The idea behind this is that any fault in the program is caught as soon as possible. The NullPointerException prevention in Nice is also rather interesting. In Java, any reference can be set to null. In Nice, only references with the ? prefix can be set to null: ?String foo = "Test"; String bar = foo; // compiler error ?String foo = "Test";
if (foo != null) {
String bar = foo; // compiles okay
}Incidentally, Nice also has pre- and postconditions, though not class invariants. |
|
|
|
|
|
|
#15 |
|
Caffeinated Neural Net
![]() Join Date: Jun 2005
Location: Dry west coast of Canada
Posts: 1,034
Rep Power: 5
![]() |
@Arevos: Semi-OT, but what is a mutable class, and where would it be used? By your comments about Java and C++ lacking this, I assume you mean something beyond a class with mutable members.
__________________
And once again, Probability proves itself willing to sneak into a back alley and service Drama as would a copper-piece harlot. - Vaarsuvius, Order of the Stick |
|
|
|
|
|
#16 |
|
Hobbyist Programmer
Join Date: May 2006
Location: West Jordan, Utah, United States
Posts: 176
Rep Power: 3
![]() |
It does however have a class loader, which I imagine you could use in that respect. I guess that wouldn't be a very good solution in some cases.
|
|
|
|
|
|
#17 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
![]()
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
#18 | ||
|
Programming Guru
![]() Join Date: Aug 2005
Location: England
Posts: 1,499
Rep Power: 5
![]() |
Quote:
For instance: python Syntax (Toggle Plain Text)
Quote:
Mutable classes are really a feature that only dynamically typed languages can have. |
||
|
|
|
|
|
#19 |
|
Troll
Join Date: Apr 2005
Location: Texas
Posts: 732
Rep Power: 4
![]() |
Mutable classes, methods as objects...I see few compelling reasons.
But multiple inheritance! Someday, hopefully.
__________________
MD5(sig) = bcef75433db02e9ad9bf81d6f7c5c270 |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|