Comments (2)
I reckon struct versus class diff
On Sunday, July 24, 2016, Mayur Tolani [email protected] wrote:
why is it that i can access, array variable outside the class?
I am new to swift, but when i was in java, i coudn't access a private
variable outside the class.
here, in playground, i am using the array variable and functions like
popLast() in Queues which completely looses the meaning of a Queue.
var que = Queue()
que.enqueue("Mayur")
que.enqueue("Tolani")
que.array//this is private, it should give an error
que.array.popLast()//this shouldn't be allowed, right?—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#169, or mute
the thread
https://github.com/notifications/unsubscribe-auth/ACCHAYTGVOGTCBJeA02hsPh0Ae_w-sMuks5qY1R0gaJpZM4JTj-o
.
from swift-algorithm-club.
public
and private
work differently in Swift than in Java.
from swift-algorithm-club.
Related Issues (20)
- Swift algorithm HOT 1
- Swift algorithm HOT 1
- Can the Convex Hull Be Simplified
- CombSorting failed to sort correctly
- Implement BinomialHeap HOT 1
- Abandoned? HOT 1
- Octree minimumCellSize not used?
- About Boyer-Moore-Horspool , are there some mistakes?
- Efficiency of LinkedList.count HOT 3
- Minimax with alpha-beta prunning
- LinkedList Get Last Node Cost NOT O(1) Time. HOT 1
- K-means algo error: use of unresolved identifier Vector HOT 1
- Tried Kmeans algo, got poor performance on obvious clusters (screenshot attached)
- Wrong comment in line 82 in Bloom algorithm
- Me And U HOT 2
- Queue Optimized - dequeu is not O(1) HOT 10
- Array2D - Enhance to include ability to create 2D array using either [col][row] or [row][col] subscripting.
- [Question] Translation to pt-br
- LinkedList`s removeAll method and default deinit may cause stack overflow
- There are some mistakes with the README.markdown and Selection Sampling code improvement
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from swift-algorithm-club.