Post has attachment
Dịch vụ thợ sơn nhà giá rẽ tại TPHCM, Thợ sơn nhà đẹp tại TPHCM, Sơn nhà giá rẽ tại TPHCM, Dịch vụ sơn nhà trọn gói tại TPHCM. Bạn đang ở khu vực TPHCM, bạn đang muốn sơn nhà, cải tạo, trau chuốt lại ngôi nhà của bạn, hãy liên hệ với công ty chúng tôi, là đơn vị hàng đầu chuyên cung cấp sơn, thợ sơn nhà, với gần 10 năm kinh nghiệm trong lĩnh vực sơn nhà, sửa chữa, sơn chống thấm..., chúng tôi tự tin mang đến cho bạn sự hài lòng nhất về chất lượng sản phẩm, với phương châm triết lý kinh doanh: UY TÍN - CHUYÊN NGHIỆP - TIẾT KIỆM - VŨNG NIỀM TIN. chúng tôi luôn làm hài lòng mọi đối tượng khách hàng.

Post has attachment

Post has attachment

Post has attachment

Post has attachment

Post has attachment
This guy is clueless about modern practices.


The way to determine if year is a leap year:

is_leap_year = year % 4 == 0;
is_leap_year = year % 100 != 0;
is_leap_year = year % 400 == 0;

This is easy to understand and faster than his method.

Multiple inheritance

Has_a relationships are easier to understand than is_a ones. Also, if the attributes are all private, they can only be accessed within methods. Having is_a relationships would complicate objects and be harder to understand.


Aside from being highly dangerous, eval is a kludge for badly designed languages. Anything eval can do, can be designed into a language without the danger.


Recursion is good for a first attempt at problem. But it can always be converted to a loop, which is faster. People don't understand the four steps of recursion and find it difficult to use. Hence, they ignore it.

Four Steps of Recursion:

Post has attachment

Post has attachment

Pointers should be a problem for language designers and compiler writers, not
on for the typical programmer. Of course, with a Von Neumman architecture, it is impossible to have a program without them but they should be under the hood for most programmers. The issue is: how to hide them from the typical programmer without sacrificing usability?

For objects (or other data structures), the need to deal directly with pointers can be eliminated with automatic memory allocation and a good garbage collector. But what about first-class functions? Can the visibility of pointers to function be hidden?

What can be done with pointers to function?

1. They can be created, that is, there must be a way to specify that a pointer is wanted and not call the function immediately.

2. They can be copied and passed around.

3. They can be called.

There is a problem here. The 2nd activity means the function could be call out of context. This is a problem in OOLs. For purely-functional languages, there is no stored state and therefore, no context.  Functions may be called anywhere. But OOLs are the antithesis of functional programming; objects have a stored, hidden state. This means it is possible to call a pointer to a function out of context for that function, which would create unpredictable results.

To deal with these issues, consider the following proposal: allow methods of a class to be replaceable.

Say there is a class X with a replaceable method, foo(). Class X implements some reasonable default behaviour for foo(). It then can use foo() in other methods.

Now there is another class, Y, which creates object x of class X and replaces foo() with it's own function bar(). Both foo() and bar() must have the same signature. That means whenever Y calls a method of X, which in turn, calls foo(), foo() is replaced with In other words, even though the code says foo(), it actually calls This is necessary because bar() requires to run inside Y's context, not X's.

Of course, this requires pointers but they are hidden from the programmer. It does add some confusion about which context the function is called in. Perhaps this can be clarified with an appropriate syntax.

On side effect is that interfaces, are just classes with all of their methods being replaceable.

Does anyone have any thoughts on improving this?

Post has attachment
Hi there!
Does anybody here know JavaScript.
I'm having trouble with my new language that compiles to it...
Wait while more posts are being loaded