Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Internal fields #2

Open
exemd opened this issue Feb 16, 2014 · 2 comments
Open

Internal fields #2

exemd opened this issue Feb 16, 2014 · 2 comments

Comments

@exemd
Copy link

exemd commented Feb 16, 2014

Correct Ć but invalid C#:

public class Point
{
  int x;
  int y;
}
public class A
{
  public void f(Point p)
  {
    p.x = 1;
  }
}

I propose that "internal" keyword should be allowed on fields. (and simply ignored)

public class Point
{
  internal int x;
  internal int y;
}

This way Visual Studio/MonoDevelop IDE can be used to write Ć.

Workaround:

public class Point
{
#if !CITO
internal
#endif
  int x;
#if !CITO
internal
#endif
  int y;
}
@epi
Copy link
Owner

epi commented Feb 17, 2014

It's not the only incompatibility with C#, so perhaps you'll need to try some more serious persuasion on @pfusik ;)

@exemd
Copy link
Author

exemd commented Jun 24, 2014

It's certainly the biggest incompatibility (80%) by number of lines of code. Other incompatibilities can be encapsulated in functions, for example:

public static byte ConvertIntToByte(int value)
{
#if CITO
    return value.LowByte;
#else
    return (byte)value;
#endif
}

"internal" is already a valid keyword for functions. Why not for fields?

I know that "common subset of Ć and C#" isn't a supported language. But Visual Studio is better IDE than CiPad ;) Especially for large projects.

The change is very small, just ignore "internal" keyword.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants