4
votes
1answer
365 views

Is there an imperative language with a Haskell-like type system? [closed]

I've tried to learn Haskell a few times over the last few years, and, maybe because I know mainly scripting languages, the functional-ness of it has always bothered me (monads seem like a huge mess ...
1
vote
1answer
158 views

Object-Oriented equivalent of LISP's progn function?

I'm currently writing a LISP parser that iterates through some AutoLISP code and does its best to make it a little easier to read (changing prefix notation to infix notation, changing setq assignments ...
2
votes
3answers
549 views

Is procedural programming the root of all object oriented evil? [closed]

If you read Working Effectively with Legacy Code, Clean Code, Refactoring: Improving the Design of Existing Code and Design Patterns you will get what I mean. Many of the examples and topics ...
1
vote
1answer
137 views

Optimizing mindmaps by finding the least amount of redundancy

When using mindmaps, you order them based on how you think it fits best. So for instance (tab means subtree) requirements dinner food forks spoons breakfast food forks this ...
7
votes
3answers
705 views

Do any object-oriented programming languages support “collective constructors”?

I was recently considering that sometimes several objects depend on each other (e.g. if they contain cyclic references) and therefore it would be useful to create them as part of one atomic operation ...
24
votes
9answers
1k views

Why most “well-known” imperative/OO languages allow unchecked access to types that can represent a 'nothing' value?

I have been reading about the (un)convenience of having null instead of (for example) Maybe. After reading this article, I am convinced that it would be much better to use Maybe (or something ...
6
votes
2answers
403 views

Module system for OOP language

I'm designing a simple OO programming language. It's statically typed, compiled, and executed by a VM - similar to Java. The difference is that I don't want to have such a strong emphasis on OOP. ...
2
votes
2answers
1k views

An ideal way to decode JSON documents in C?

Assuming I have an API to consume that uses JSON as a data transmission method, what is an ideal way to decode the JSON returned by each API resource? For example, in Java I'd create a class for each ...
4
votes
1answer
636 views

Objects of different programming languages

Apparently, there are some resemblance between objects in JavaScript and dictionaries in Python. Each language defines an object a little different (and there is some logic that all definitions to be ...
13
votes
5answers
972 views

What makes JVM so much versatile to support so many JVM languages?

JVM supports so many languages other than Java like Groovy,Clojure,Scala etc which are functional languages unlike Java(I am referring to Java before Version 8 where Lambda's are not supported) that ...
3
votes
2answers
196 views

Dependency properties outside the realm of WPF?

Is there a more general concept or name for what WPF calls "dependency properties"? I imagine this is not a WPF-ism and in fact other libraries or frameworks have employed a similar approach? If so, ...
5
votes
6answers
3k views

Is there any difference between interfaces and abstract classes that have abstract methods only?

Let's say we have an abstract class and let this class has only abstract methods. Is this abstract class different from an interface that has same methods only? What I am looking to know is if there ...
5
votes
5answers
4k views

Is there any difference between pointers and references? [duplicate]

References and pointers do the same thing as I know. Is there any difference between them? If there is no difference, why we call them reference not pointer?
6
votes
3answers
1k views

Why do some of object oriented languages let programmer use primitive types?

Why do some object oriented languages let the programmer use primitive data types? Aren't classes like Integer, Boolean, etc. enough?
1
vote
1answer
362 views

Are silly examples bad way to learn OOP? [closed]

Some tutorials give silly examples to teach OOP, for example: Car class and myCar object, etc. Is that way considered bad in learning OOP assuming that these examples not applied to real programming ...
8
votes
3answers
388 views

Would it be better to have extra checks, or would it be a waste of time?

In your opinion, do you think it is a waste of time to make checks that you know there is no possible way of it being there/not being there, or would you just put it there just in case there is a bug ...
15
votes
5answers
2k views

What is considered third party code?

Inspired by this question Using third-party libraries - always use a wrapper? I wanted to know what people actually consider as third-party libraries. Example from PHP: If I'm building an application ...
11
votes
1answer
766 views

Why did object-oriented paradigms take so long to go mainstream?

I read this question and it got me thinking about another fairly recent thing. Object oriented languages. I'm not sure when the first one was created, but why did it take so long before they became ...
3
votes
2answers
558 views

Something similar to Objective-C categories in other languages?

I understand Objective-C categories and how they become useful, but I always have a hard time explaining the concept to other programmers that are not familiar with Objective C. Maybe I'm just bad ...
4
votes
4answers
481 views

How much is modern programming still tied to underyling digital logic? [closed]

First of all: I've got no academic background. I'm working primarily with Java and Spring and I'm also fond of web programming and relational databases. I hope I'm using the right terms and I hope ...
12
votes
10answers
2k views

What's the next level of abstraction? [closed]

Since programming languages initially only used lines of code executed sequentially, and it evolved into including functions which were one of the first levels of abstraction, and then classes and ...
1
vote
1answer
105 views

How to represent association in programs [closed]

Could someone help me in implementing association in cpp. I am trying to implement a dice game where I have two classes a diegame and a dice.
9
votes
5answers
2k views

Benefits of classic OOP over Go-like language

I've been thinking a lot about language design and what elements would be necessary for an "ideal" programming language, and studying Google's Go has led me to question a lot of otherwise common ...
51
votes
15answers
15k views

What makes C so popular in the age of OOP?

I code a lot in both C and C++, but did not expect C to be the second most popular language, slightly behind Java. TIOBE Programming Community Index I'm curious as to why, in this age of OOP, C is ...
1
vote
3answers
268 views

Any language where every class instance is a class too?

Taking inspiration from Javascript prototypes, I had the idea of a language where every instance can be used as a class. Before I potentially reinvent the wheel, I would like to ask if there is a ...
2
votes
5answers
2k views

Criteria for a language to be considered “object oriented”

I had a discussion about OO programming today and by browsing the internet I found a lot of different specifications for object oriented languages. What are the requirements for a language to be ...
2
votes
3answers
312 views

Basis of definitions

Let us suppose we have a set of functions which characterise something: in the OO world methods characterising a type. In mathematics these are propositions and we have two kinds: axioms and lemmas. ...
7
votes
11answers
987 views

What language should be used to teach object-oriented design and development in university?

My understanding is that C++ is usually offered as the 1st OOP language, and as the 2nd programming language (after C) in my country (Bangladesh). I've taught it several times, and the problem I've ...
40
votes
8answers
3k views

Do object-oriented programming languages exist that are not class-based?

Are there any object-oriented programming languages that are not based on the class paradigm?
6
votes
1answer
3k views

Python programming patterns and practices? [closed]

What are the best python programming patterns and practices you are using every day? I don't mean only design patterns (there are lot of OO design patterns that can be used in python), I mean pure ...
16
votes
3answers
882 views

Newbie question about Decorator design pattern

I was reading a programming article and it mentioned the Decorator pattern. I've been programming for awhile but without any kind of formal education or training, but I'm trying to learn about the ...
5
votes
3answers
220 views

Is it acceptable practice to give an object a pointer to “the world”?

I often find myself in situations where objects need to communicate between each other. For example, a button might need to talk to various textboxes. Would it be proper to simply construct each ...
8
votes
3answers
465 views

Can you Improve your programming skills by learning other language paradigms?

If so, can you tell me how learning a new paradigm changed your approach for solving programming problems even if the problem is in another paradigm/language/technology? I will really appreciated If ...
30
votes
17answers
7k views

How can I feel more confident about my programming skills? [closed]

Programming isn't alien to me. I first starting doing markup (HTML, now please don't laugh at me) when I was 12 and a little bit of BASIC when I was 13 (I knew much about Flowcharts, Pseudocodes at ...
25
votes
13answers
5k views

Why are objects passed by reference?

A young co-worker who was studying OO has asked me why every object is passed by reference, which is the opposite of primitive types or structs. It is a common characteristic of languages such as Java ...
6
votes
7answers
1k views

What exactly is OO reuse?

And why is it often talked about? Like I know what OO programming is obviously... but people always say "Oh OO reuse is the biggest programming myth ever". What exactly does this mean?
10
votes
9answers
1k views

What simple game is good to learn OO principles?

I have to come up with a project propsal for my students, here are some details: The design should be gove over OO concepts: encapsulation, interfaces, inheritance, abstract classes Idealy a game, ...
3
votes
6answers
366 views

Why are interfaces not casteable/ducktypeable?

One thing that always irked me (in C#) was that there's a hard dependency between an interface/abstract class and the implementing class and assembly. Meaning that that if two different assemblies ...
5
votes
9answers
471 views

Is there a programming language with not a tree but tags idea behind OOP?

I'm thinking about tree structures, and I feel that I don't like them. It's like when you have a shop, then you try to put all products to tree-like catalog, and then you need to place one product to ...
2
votes
5answers
2k views

Best way to learn Java if you already have an OOP background, like ActionScript 3? [closed]

I'm looking to learn Java, but I don't want to get a book that is going to tell me what an object is, how OOP works, etc. I know this from my existing ActionScript 3 work. One idea is to look at all ...
11
votes
4answers
951 views

FP and OO orthogonal?

I have heard this time and again and I am trying to understand and validate the idea that FP and OO are orthogonal. First of all, what does it mean for 2 concepts to be orthogonal ? FP encourages ...