/dpt/ - Daily Programming Thread

I'd go with Programming principles and then CLR.

Not the guy you were replying to, but I want to learn C++ too, already know C# super well. I just want to know a flagship lower level language with object oriented features and C++ fits the bill.

meant to reply to

cuz oop. I won't become fixated in one language, thanks for caring about me tho, user

yea, guess that's the right route, thanks

here is the complete program
using System;
using System.Globalization;

namespace stargen
{
class Program
{
static void Main(string[] args)
{
Random rand = new Random();

while(true)
{
double seed = rand.NextDouble() * 49.5 + 0.5;
Star star = new Star(seed);
Console.Write(star.ToString());
Console.Read();
}
}
}
class Star
{
const double SolarMass = 1.989e30;//kg
const double SolarRadius = 695700;//km
const double SolarTemperature = 5778;//k
const double SolarSystemRadius = 86;//au, termination shock
public double Mass { get; }
public double SolarMasses { get; }
public double Radius { get; }
public double SolarRadii { get; }
public double Temperature { get; }
public double SystemRadius { get; }

//public List Planets { get; }
public Star(double mass)
{
Mass = mass * SolarMass;
SolarMasses = Mass / SolarMass;
Radius = Math.Pow(SolarMasses, 0.8);
SolarRadii = Radius / SolarRadius;
Temperature = SolarTemperature * Math.Pow(Math.Pow(SolarMasses, 2.5), 0.25);
SystemRadius = SolarSystemRadius * (Temperature/SolarTemperature);//just make shit up
}
public override string ToString()
{
String s = "Solar Masss="+ SolarMasses + "\n" +
"Solar Radii=" + SolarRadii.ToString() + "\n" +
"Solar Radii=" + SolarRadii.ToString("F3", CultureInfo.InvariantCulture) + "\n" +
"Temperature=" + Temperature + "\n" +
"System Radius=" + SystemRadius.ToString("F3", CultureInfo.InvariantCulture) +"\n"
;
return s;
}
}
}

what should I make, Jow Forums?

Attached: No idea 4.jpg (400x296, 50K)

A VN featuring your waifu

Simply distribute requests over a set count of blocking workers like here github.com/bakape/hydron/blob/master/fetch/fetch_tags.go#L50-L64

>python doesn't have switch
Can C unironically make better fizzbuzz code than python?

Attached: 1528813319225.jpg (800x450, 42K)

Why the fuck would you be using switch for FizzBuzz?