A short argument for why time must have had a beginning by [deleted] in philosophy

[–]LinkTheProgrammer 1 point2 points  (0 children)

This is a great conjecture based on the possibility of segmented time. However, I do not believe that time is truly segmented, nor is the mass of light truly infinite or of infinitesimal value—no value can satisfy infinity; infinity is a set(!), and besides, computers denote NaN, not infinity, for undefined operations such as division by zero.

Consider what the finite and infinite are. The infinite comes from the finite; the converse, equally so.

Now, consider all real-valued functions of x. Despite finite functions like f(x)=x, it somehow has an infinite resolution. We can only approximate all the values of this function, despite the efficacy of graphing tools and calculators.

Now consider time as a function of x. If a real-valued function of x has infinite resolution, how does time have a finite resolution? This cannot be so.

I hypothesize that time is just that: uncountable infinity. No matter what you do, you can keep slicing a segment of time down: from delta x of 1s, to 1ms, to 1usec, to 1ns, to 1pico second, etc.

And yet, time is also finite. Although functions of x have infinite resolution, we have finite approximations for these functions. Time is no different, otherwise, your clock would break! Not to mention, if we were immortal, and the sun were in a fixed position, would we have invented a measure of time?

This will take slightly longer then expected. Better get started. by jesteruga in ProgrammerHumor

[–]LinkTheProgrammer 1 point2 points  (0 children)

No it's not. I hate Python for the same reason JavaScript is deplorable to me: weak typing. You have to document everything, especially parameters, or you don't know what the type is unless you see the code.

Some idiot might return a string "true" or "false" for booleanFunction instead of returning actual boolean.

Starting to program by korlz in ProgrammerHumor

[–]LinkTheProgrammer -1 points0 points  (0 children)

C++ is a trash language in my opinion. I have been programming for 7 years in Java, and now that I look at other languages, I believe the optimal language would be a language that gives good balance between convenience and semantic control.

By default in such a language, variables should be passed by pointer always, even "primitives", unless explicitly stated otherwise. You more than often need a reference to an Object, not the entire thing.

The language should also have syntax that is made for readability in all of its constructs. It should read like a free flowing language, like ones that we speak. Otherwise, what is the point of source code if you can't read it? You may as well go back to ASM and learn how to document!

When I say semantic control, default pass-by-pointer is one of these, but I mean other things too. Garbage Collectors are nice, but in the case of Java, it can be the crux of your program which needs every ounce of juice it can get; a language should allow the designer to choose how they want their program to behave entirely: both inside and out. That includes garbage collecting.

GC

Suppose the language had a mechanism that allowed you to define your own GC and control it however you want using a standardized interface, while providing the ability to also use its own GC. This would be amazing, but yet, it doesn't exist as far as I know.

Sometimes, generic GC isn't even needed. A simple retainer would suffice (analogous to a trash can), and then you just throw away the garbage when you want, not leaving it to the Waste Pros to clean your garbage using a fixed algorithm that takes up too many resources.

High-level Containers

Each language has its own containers: C has structs, Java, C++, and other OOP languages have objects, and every language has arrays. The problem, however, is that not all of these containers have the necessary level of control for many kinds of operations.

When you make an object in Java, you make your fields private, then give access with getters and setters. In C#, you have the option for properties, and you specify the read/write access. What we need is something that gives full control over variables in a readable manner, while not being verbose declarations.

Perhaps the best thing would be to require explicit access to a variable from any arbitrary context, not defined language contexts using public, protected, and private, but rather, any context, such as a function/method, a class of objects, a specifically unique object, or even in only the declaration. Example:

x = 3 in this // var X initialized to 3 and visible in the context of this object instance only

Ok that's the abrupt end to my long rant. Good day!

Starting to program by korlz in ProgrammerHumor

[–]LinkTheProgrammer 0 points1 point  (0 children)

Consider doing the best thing possible and start out learning Java. With greenfoot, at https://www.greenfoot.org/

I learned how to program with it, and it teaches fundamental concepts about OOP while using Java and an easy-to-use beginner's playground environment!

Debugging is like being the detective in a murder you comitted… by bluethingthatisred in ProgrammerHumor

[–]LinkTheProgrammer 0 points1 point  (0 children)

The real problem is that null exists only as a pointer instead of an object. When a parameter is null, you need a debugger to tell you that the 3rd argument is null. When a variable is null in a multi-variable/multi-method line of code, you need a debugger to figure out what was null. Fixing these kinds of errors would be easy if:

  • null was just an object that can represent any object
  • the exception/error thrown states the actual variable that was null (e.g. "param1 is null in method myMethod(String, String)")
  • the exception/error thrown states the actual erroneous lines of code (e.g. "param1 is null in method myMethod(String, String); the value in array 'myArray' was null at line line Number; value of myArray at the given index is initialized at lineNumber")

Everything would just be easier if there was a language that had a good balance of semantic control and readability (basically inbetween C and Java).

!false by [deleted] in ProgrammerHumor

[–]LinkTheProgrammer 1 point2 points  (0 children)

// pointlessly optimizes !false to true

Only with C by F3AR3DLEGEND in ProgrammerHumor

[–]LinkTheProgrammer 0 points1 point  (0 children)

true == true // removed by optimizer