Page 4 of 5 [ 67 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next

SyntacticSugar
Butterfly
Butterfly

User avatar

Joined: 7 Apr 2007
Gender: Male
Posts: 12

08 Apr 2007, 10:01 am

Quite a bit of my assistantship involves teaching students to program in Ada. You can index your arrays in any fashion you see fit. Any numeric range or enumeration type works.



lau
Veteran
Veteran

User avatar

Joined: 17 Jun 2006
Age: 76
Gender: Male
Posts: 9,795
Location: Somerset UK

08 Apr 2007, 11:37 am

SyntacticSugar wrote:
Quite a bit of my assistantship involves teaching students to program in Ada. You can index your arrays in any fashion you see fit. Any numeric range or enumeration type works.
Ah! But in C# (at alia), you're not so harshly limited. :)
Subscription is merely syntax. You can subscript with anything you fancy: floating point, knitting patterns or varieties of cheese and/or aircraft.


_________________
"Striking up conversations with strangers is an autistic person's version of extreme sports." Kamran Nazeer


impeachgod
Snowy Owl
Snowy Owl

User avatar

Joined: 13 Apr 2006
Age: 32
Gender: Male
Posts: 164
Location: Kyiv, Ukraine

08 Apr 2007, 1:32 pm

Lisp FTW! I use scheme for all my coding projects, and it rocks cuz it let's you concentrate on the problem, and you can prototype very fast in it.



Gilb
Veteran
Veteran

User avatar

Joined: 4 Jan 2007
Gender: Male
Posts: 1,214

08 Apr 2007, 1:50 pm

my question is:
if you don't like OOP then why don't you just not use it, there are many languages that are not object orientated.
and why is there an article treating OOP as some kind of government conspiracy.
am i missing something?



calandale
Veteran
Veteran

User avatar

Joined: 9 Mar 2007
Gender: Male
Posts: 12,439

08 Apr 2007, 6:19 pm

impeachgod wrote:
Lisp FTW! I use scheme for all my coding projects, and it rocks cuz it let's you concentrate on the problem, and you can prototype very fast in it.


Do you find graphics easy in it? I've never really tried in a functional language.

What's the largest peice of functional code that you wrote? To me, it starts to break down after a few thousand lines, but that may be more a matter of limited IDE availability. Maybe something like namespaces (I don't know scheme at all - it may have them already) would help.



Aspie_Chav
Veteran
Veteran

User avatar

Joined: 6 Feb 2006
Age: 51
Gender: Male
Posts: 2,931
Location: Croydon

09 Apr 2007, 12:14 am

Gilb wrote:
my question is:
if you don't like OOP then why don't you just not use it, there are many languages that are not object orientated.
and why is there an article treating OOP as some kind of government conspiracy.
am i missing something?


The answer is simple “can hate be good, can hate be something you don’t hate”. It is all on the interest of good programming practice. If the oop community don’t like this site they should attack the ideas in an objective way. As yet I don’t think they have done this.
Have you tried to buy a book on functional or procedural methodologies?



calandale
Veteran
Veteran

User avatar

Joined: 9 Mar 2007
Gender: Male
Posts: 12,439

09 Apr 2007, 3:30 am

Aspie_Chav wrote:
Have you tried to buy a book on functional or procedural methodologies?


Why? Are they hard to find now?

One clear issue is that whether one likes OO or not, for any reasonable
jobs in the real world, you're going to have to deal with it. Just like certain
languages have gone out of favor (usually for good reason) so has non-OO
design.



impeachgod
Snowy Owl
Snowy Owl

User avatar

Joined: 13 Apr 2006
Age: 32
Gender: Male
Posts: 164
Location: Kyiv, Ukraine

09 Apr 2007, 4:20 am

Quote:
Do you find graphics easy in it? I've never really tried in a functional language.


I don't do graphics.

Quote:
What's the largest peice of functional code that you wrote?

I haven't written large programs yet, only small command line utilities up to 400 lines long.

Quote:
To me, it starts to break down after a few thousand lines, but that may be more a matter of limited IDE availability. Maybe something like namespaces (I don't know scheme at all - it may have them already) would help.

I use DrScheme, which has a very good IDE where you can test functions as soon as you write them. For bigger programs one would use Common Lisp, as it has namespaces, OO, and other features.

But the best thing about Lisp is it's ease of debugging.



0_equals_true
Veteran
Veteran

User avatar

Joined: 5 Apr 2007
Age: 42
Gender: Male
Posts: 11,038
Location: London

10 Apr 2007, 5:38 am

I don't get the point of this thread. So what? I like 'structured', oo, assembler. I'm abstract so I sometimes like to get in the think of it, other times I just want to get things done. What I think is bad is the use of ‘constructs’ that is something that pretends to be something it isn't like something that seems like a function but isn't really. A language that does that can't really claim to be a pure oo language. pure oo can't by definition have any special cases as everything has to be treated as an object even numbers. I have to say there is elegance in methods over functions.

5.times { puts "hello world" }



lau
Veteran
Veteran

User avatar

Joined: 17 Jun 2006
Age: 76
Gender: Male
Posts: 9,795
Location: Somerset UK

10 Apr 2007, 8:09 am

0_equals_true wrote:
I don't get the point of this thread. So what? I like 'structured', oo, assembler. I'm abstract so I sometimes like to get in the think of it, other times I just want to get things done. What I think is bad is the use of ‘constructs’ that is something that pretends to be something it isn't like something that seems like a function but isn't really. A language that does that can't really claim to be a pure oo language. pure oo can't by definition have any special cases as everything has to be treated as an object even numbers. I have to say there is elegance in methods over functions.

5.times { puts "hello world" }

Interesting... I'd be fascinated to know what it is you are talking about here: ‘constructs’, pretends, function, isn't really, pure oo language.
So far as I'm concerned, OO is just a nice (if not terribly well-defined) paradigm, of the moment. I see no reason why something "better" shouldn't come along.
I see "function" and "method" as rather overworked words. For the next paradigm, how about "effluent"?

Gosh! I think Google has got to me. I'm now joining the new wave: "TOP". Toilet Oriented Programming!


_________________
"Striking up conversations with strangers is an autistic person's version of extreme sports." Kamran Nazeer


ahayes
Veteran
Veteran

User avatar

Joined: 2 Dec 2006
Gender: Male
Posts: 9,506

10 Apr 2007, 8:15 am

Lau wrote:
I see "function" and "method" as rather overworked words.


Just another word for subs.



0_equals_true
Veteran
Veteran

User avatar

Joined: 5 Apr 2007
Age: 42
Gender: Male
Posts: 11,038
Location: London

10 Apr 2007, 11:09 am

Lau wrote:
0_equals_true wrote:
I don't get the point of this thread. So what? I like 'structured', oo, assembler. I'm abstract so I sometimes like to get in the think of it, other times I just want to get things done. What I think is bad is the use of ‘constructs’ that is something that pretends to be something it isn't like something that seems like a function but isn't really. A language that does that can't really claim to be a pure oo language. pure oo can't by definition have any special cases as everything has to be treated as an object even numbers. I have to say there is elegance in methods over functions.

5.times { puts "hello world" }

Interesting... I'd be fascinated to know what it is you are talking about here: ‘constructs’, pretends, function, isn't really, pure oo language.


in php

empty()

not a function

you can't do

if (empty(trim($x))){

}

only

$x = trim($x);

if (empty($x)){

}


dumb stuff like that. Contructs is any element that makes up a programming language or script, but in this context I'm meaning to be a special case where it acts like something it isn't.

Check this blog;

http://www.dcmanges.com/blog/26



Last edited by 0_equals_true on 10 Apr 2007, 1:12 pm, edited 1 time in total.

lau
Veteran
Veteran

User avatar

Joined: 17 Jun 2006
Age: 76
Gender: Male
Posts: 9,795
Location: Somerset UK

10 Apr 2007, 11:40 am

0_equals_true wrote:
in php

empty()

not a function
Yes it is. It is defined as such. The fact that it requires its parameter to be a variable, and can detect an error at compile time, rather than runtime, doesn't stop it being a function.

0_equals_true wrote:
dumb stuff like that. Contructs is any element that makes up a programming language or script, but in this context I'm meaning to be a special case where it acts like something it isn't.
I don't expect all languages to be the same as one another. Just because you've learnt one language that defines "function" in one way, that doesn't mean all the rest have to do it the same. I'm bemused that you seem to be saying that.

0_equals_true wrote:
I did. It didn't seem relevant. Something about ducks (whatever that's all about) and Ruby apparently doing one of my pet hates - uncontrolled coercion.


_________________
"Striking up conversations with strangers is an autistic person's version of extreme sports." Kamran Nazeer


calandale
Veteran
Veteran

User avatar

Joined: 9 Mar 2007
Gender: Male
Posts: 12,439

10 Apr 2007, 1:30 pm

impeachgod wrote:
Quote:
Do you find graphics easy in it? I've never really tried in a functional language.


I don't do graphics.

Quote:
What's the largest peice of functional code that you wrote?

I haven't written large programs yet, only small command line utilities up to 400 lines long.

Quote:
To me, it starts to break down after a few thousand lines, but that may be more a matter of limited IDE availability. Maybe something like namespaces (I don't know scheme at all - it may have them already) would help.

I use DrScheme, which has a very good IDE where you can test functions as soon as you write them. For bigger programs one would use Common Lisp, as it has namespaces, OO, and other features.

But the best thing about Lisp is it's ease of debugging.


I think that you'll find that functional programming begins to become difficult with large, multi-programmer projects. Although OO features certainly would help a great deal. I never really wrote anything huge in lisp (probably under 1000 lines), but it strikes me as somewhat more difficult to integrate in.



calandale
Veteran
Veteran

User avatar

Joined: 9 Mar 2007
Gender: Male
Posts: 12,439

10 Apr 2007, 1:35 pm

ahayes wrote:
Lau wrote:
I see "function" and "method" as rather overworked words.


Just another word for subs.


That's rather like saying book is just another word for writing. There are some fundamental concepts behind functions and methods which distinguish them from the more general idea of a subroutine.



0_equals_true
Veteran
Veteran

User avatar

Joined: 5 Apr 2007
Age: 42
Gender: Male
Posts: 11,038
Location: London

10 Apr 2007, 1:40 pm

Lau wrote:
Yes it is. It is defined as such. The fact that it requires its parameter to be a variable, and can detect an error at compile time, rather than runtime, doesn't stop it being a function.

Not in terms of php it’s not.

php wrote:
Note: Because this is a language construct and not a function, it cannot be called using variable functions


Lau wrote:
I don't expect all languages to be the same as one another. Just because you've learnt one language that defines "function" in one way, that doesn't mean all the rest have to do it the same. I'm bemused that you seem to be saying that.

I'm not saying that I'm talking with the same language. I do realise that function is just an abstract.

Anyway that's just an example I’m talking about special cases. Things that are botched to make them work.

Lau wrote:
I did. It didn't seem relevant. Something about ducks (whatever that's all about) and Ruby apparently doing one of my pet hates - uncontrolled coercion.

First off I like ducks so don't say anything against them :x ;) Have you not heard of Duck Typing? I was demonstrating that nothing is a special case. Like for example in Ruby 0 is part of the FixNum object class as is 1,2 3... so it shouldn't be treated as a special case. As FixNum objects evaluate to true 0 does. Why should it be a special case?