473,395 Members | 1,972 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Dialects

Whatever you do, don't flame me.

You see, I am an amateur, never did "professional" things. So I am
interested in things pros aren't worried about.

If there are things already out there meeting my expectations...let me
know. Best if they are free.

The 'generic' feature is debatable---but I don't quite get it. I mean,
to me, there is nothing to complain about. May be because I don't see
the complications.

But I reckon there are features, mostly already implemented in other
languages, that could improve the usability of Java. But such features
at random could harm the original motivations behind Java.
Mostly...the 'everything is a class' one. Well, not everything,
perhaps.

The key characterization of the features I want is that the JRE should
not, in any way, be changed to implement them. I don't think even the
compiler should be either. So what I am proposing is not any inherent
change in the language...just adding another layer on top of Java. It
should not be called a language...I suppose it can be called a
dialect.

I suppose the generic feature is exactly what I am talking about. Even
the compilations...as far as I get it...are not necessarily anything
new. The thing is, the generics are just Objects, and the compiler
merely makes sure that the castings are according to the programmer's
prescription, all the time.

This is like constraining a language a bit. I like the sound of it.

So why don't we, if it hasn't been already done, develop standard
dialects of Java, along with 'semicompilers' that produce Java source
code? Obviously the IDEs won't help us...but what do you say?

There are things like the 'with' keyword in Visual Basic. Usually when
you use some specific object exclusively, you also don't want
interruptions right then. So a legitimate candidate could be the
'synchronized' keyword.

class Scale extends Vector<String> {
public static CMajor() {
synchronized(new Sequence()) {
.add("C");
.add("D");
...
.add("B");
return .this;
}
}
}

Note this way you have to name fewer variables. That's good practice.

Then there are enumerations. I think they are only good when they can
be used with the 'switch' statements as well. The C++ (and like)
implementations use integers as enums, I don't quite like it.

*The* implementation of an enum should be:

class Coin {
private Coin() { }
public static final Coin Dime = new Coin();
public static final Coin Nickel = new Coin();
....
}

We can, perhaps, add a keyword in our dialect: enumeration;

public class Something {
enumeration Coin { Dime(), Nickel(), ... };

....

public void choose(Coin coin) {
switch(coin) {
case Dime:
case Nickel:
...
}
}

And the implementation is like an inner class. I believe that the
dialect should always implement it as an inner class. The switch
implementations are just

if(coin == Dime) {
} else if(coin == Nickel) {
} ...

and perhaps, in one non-standard version...we could implement the
ordered pairs, and n-tuple in general.

(int, int) divide(int what, int by) {
int quotient = what / by;
int remainder = what - quotient * by;
return (quotient, remainder);
}

things like that.

So what do you say? Any new ideas? Perhaps a couple of more thought of
features could make the dialect worthwhile. Cheers.
Jul 17 '05 #1
0 1560

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

220
by: Brandon J. Van Every | last post by:
What's better about Ruby than Python? I'm sure there's something. What is it? This is not a troll. I'm language shopping and I want people's answers. I don't know beans about Ruby or have...
77
by: Gerrit Holl | last post by:
Hi, the <> inequality test operator has been deprecated for a loooooong time. Is there a reason that it doesn't trigger a DeprecationWarning? $ python2.2 -Wall -c "print 0 <> 0" 0 $...
14
by: Marco Aschwanden | last post by:
Hi I would like to develop an app that is (more or less) database independet. Python DB API helps when masking "parameters" of sql statements. The db driver cares for the correct conversion of a...
242
by: James Cameron | last post by:
Hi I'm developing a program and the client is worried about future reuse of the code. Say 5, 10, 15 years down the road. This will be a major factor in selecting the development language. Any...
8
by: Sebastian Kerekes | last post by:
Greetings, I'm developing an application that supports multiple languages. In my XSL I use variables to place the text where it belongs to. At the top of the document I include those variables -...
28
by: A.Translator | last post by:
I am still struggling with an unordered list (http://www.xs4all.nl/~hogen/TaalVlinder/). The top navbar contains 4 divs with each an ul, and no padding or margins. But I get far too much...
13
by: Dave | last post by:
Can anybody tell me why the code below should produce the error below? I'm going nuts here! Am I missing something incredibly obvious and simple? std::string::size_type idx; std::string...
3
by: Matt | last post by:
I always heard dialet of programming language. Or implementation of a programming language. What does it really mean? C++ is standardized already, does it mean it doesn't have any dialets? But I...
41
by: Greenhorn | last post by:
Hi, We see that C is a bit liberal towards non-standard syntax, for e.g. when i tried <printf("string1", "string2 %d", v1);> in Dev-C++, it printed string1 and no error was raised, is this the...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.